If you didn’t hear before about pinetd, let me tell you more about it.
Initially, when PHP3 was out, I wrote a mail server using php. It was initially using xinetd to be run, then PHP/NC was born. PHP/NC (NC = Non-Connu) was a normal build of php 3, including a few more functions about sockets manipulation. It wasn’t really safe, but allowed more control over sockets in php.
Then, PHP4 was released, and a socket extensions was there too…
So the first version of phpinetd, an equivalent to xinetd was written by me.
This version has grown with new releases of PHP, but the core stayed the same for a long time…
Right now, pinetd v2, the new version, is being written…
http://ookoo.org/svn/pinetd2/

