how to serve a php web server code example Example: php serve // to serve folder foo in public $ cd ~/public $ php -S localhost:8000 -t foo/