Skip to content
Advertisement

How to shutdown default PHP server “php -S”

I can start the default PHP server with php -S localhost:8000 but how to stop the server? Usually with CTRL + C yes, but if i want to do it from another terminal?

Advertisement

Answer

starting:

JavaScript

stopping

JavaScript

That’s only an example without proper error handling

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement