If you need a test server with PHP on your computer before uploading to a website I would suggest you use xampp for an easy to install web server, then you just need to enable the required modules such as MYSQL and PHP and put your files in the htdocs folder and then access the pages via
cPanel®. (shouldn't say cPanel for that link but if you click it works fine or just look at the url when hovered over)
apache friends - xampp