@randall wrote:
You are actually not correct about PHP being cgi based.
It is possible to run it as a cgi script, but it is usually tied deeper into the web server through a plugin interface. Also, both have their own unique difficulties with performance tuning, so don't act like one is easy and the other is hard. PHP can be compiled to C or even run in a JIT runtime. Check out Facebook's work on these two areas: HipHop.