The PHP part is VERY easy...However.. as mentioned.... this may not be the correct language (or easiest at least) to be working with for this type of project.
Yes, PHP is very easy. However the whole concept behind PHP is as a means of scripting web pages in response to HTTP requests. That is:
a) WEB browser makes HTTP request.
b) WEB server gets HTTP request.
c) WEB server runs the PHP embedded in the requested page text.
d) WEB server replies to browser with whatever that PHP outputs.
e) Browser renders the returned HTML response.
What's missing here is:
1) PHP is only run briefly when requested.
2) Therfore PHP is not sensibly in control of the PWM or other peripheral devices.
3) Is there even an API for PHP to set PWN, GPIO, etc. Might be, I don't know.
Basically the whole model is wrong for managing peripheral devices.
That being said, I usually ONLY do PHP web development.... but being as this a WEB (server side scripting language)... how do you believe the PHP script should communicate with the servo?
That's OK. If you have the skills to master PHP and all the associated HTML, CSS and complications of web development then you can easily pickup other things, be they Python, node.js, C/C++...
PHP may well have an API to set the parameters of a PWM device. I don't know. If not you can use PHP's "system" or "exec" or whatever PHP calls it to run some other code, in Python say, that can talk to PWM.
So.. I would have my PHP script either attempt to communicate with via serial port to the attached Arduino.. that would parse the data and send off the command using the included servo library method()..
Where did this Arduino enter the picture? Not required for using PWM on the Pi.
or I would use an ESP module to connect to the php/webpage and get the data..(url parameter)... and either parse/take action itself.. (if enough I/O pins)... or send to a connected Arduino via software serial connection..
How is your servo attached?
I do not have a servo attached to any Pi. But I have done similar things.
Personally, given your original requirement statement and ignoring the requirement to use PHP: "make a webpage that will put a 180C servo in 5 positions using 5 buttons and buttons that will make the servo take 1 position.." I would forget about using PHP and Apache.
That simple node.js program would implement a web server using the express.js module:
Simultaneously that node.js program would be managing the PWM device(s) using the pigpio module:
Now, should it happen that you have many PWM servos and perhaps other devices it may be convenient to control them from an Arduino or other MCU and have that communicate with the Pi where the web interface is running. That's OK, the above scheme can be easily extended to talk over serial ports:
Memory in C++ is a leaky abstraction .