Writing a PHP daemon application


Writing a PHP daemon application – Simas Toleikis

There is a special group of applications that require a different PHP script execution model. For example:

* A chat server (or any other kind of socket server therefore)
* A HTML5 WebSocket server
* A web crawler, data harvester or any other real-time service

All of the mentioned applications need to be run in the background as daemons – something that PHP was never designed/supposed to be good at. The plain C language is a weapon of choice when it comes to writing a daemon implementation, but then again, if the application in question does not depend on high performance and concurrency – PHP can do the job quite well.

Related Posts