If you’re looking for a way to check if your PHP code is correct or not without ever loading your script to the web server, then try writecodeonline.com. Just paste your PHP code on the online form and click the ‘Run Code’ button and see if your code validates. The online interpreter defaults to PHP 5, but you can choose PHP 4 if you prefer.
I’ve used it several times to check if my logic makes sense. It’s a great tool to have. It’s very handy tool to have if you want to do a quick check if your code works or not. It does throw out errors so you’ll be able to correct your script if it has a syntax error or if your logic is incorrect.
Beginning with PHP 5.4, PHP comes with a built-in server. It’s meant to aid application development or for testing in controlled environments. It’s not meant to be a production server or placed in a public network.