php -Serve code example
Example 1: php serve
// to serve folder foo in public
$ cd ~/public
$ php -S localhost:8000 -t foo/
Example 2: php server
php -S localhost:8000 -t ./
// to serve folder foo in public
$ cd ~/public
$ php -S localhost:8000 -t foo/
php -S localhost:8000 -t ./