Dup Ver Goto 📝

PHP Dev Server

PT2/lang/php/debugging php net does not exist
To
25 lines, 84 words, 633 chars Page 'DevServer' does not exist.

Source: php.net

$ cd ~/public_html
$ php -S localhost:8000
$ php -S localhost:8000 -c php.ini

One of the comments:

It’s not mentioned directly, and may not be obvious, but you can also use this to create a virtual host. This, of course, requires the help of your hosts file.

Here are the steps:

1    /etc/hosts
    127.0.0.1    www.example.com

2    cd [root folder]
    php -S www.example.com:8000

3    Browser:
    http://www.example.com:8000/index.php

Combined with a simple SQLite database, you have a very handy testing environment.