Is there any way to test PHP locally without installing a server?

There’s no need for a server if using PHP 5.5+ – it has a built-in server (http://www.php.net/manual/en/features.commandline.webserver.php)

Just use:

$ cd ~/public_html
$ php -S localhost:8000

Leave a Comment