Project layout:
$ /t/project> tree .
.
├── public
│ ├── cliserver.php
│ └── index.php
├── src
└── test
Start dev server:
cd public && php -S 127.0.0.1:8080 cliserver.php
For some more details about routing with the PHP built in development server, see my article