Start PHP builtin server for a Project without Apache
To PHP developer, setting up new development environment is a repetitive job, it’s boring and take time when you want to test something quick on system that’s not yours. luckily, PHP include a built in server out of box from version 5.6 and today i’m going to show you how to execute it.
first, you will need a php project with index.php file. Then use terminal emulator to go to project root and execute this command :
php -S localhost:8080
You can nowย access your project at this address on your browser : localhost:8080 , just simple like that.
Default entry point is index.php, but you can access other file.
This is good to see all requests come in or error. Can be used on the fly for quick debugging. hope you find it useful ๐