So I've done php -S localhost:8000
, but I don't need it anymore, I need my 8000 localhost back. How to stop the php server?
The exit() function in PHP is an inbuilt function which is used to output a message and terminate the current script. The exit() function only terminates the execution of the script.
Simply use Ctrl + C .
PHP supports CLI SAPI(Command Line Interface Server API) for executing the script from the command line. This SAPI will differ from other interfaces based on the IO practices, configuration defaults, buffering and more. For example, IO practices – it will not support the PHP request method (GET, POST).
killall -9 php
That's how I would do it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With