|
As a matter of fact, if it's good code against shit code, the good code will almost always be better. PHP is interpeted, C/C++ isn't (beyond linking libraries at runtime), but the people who are making these comparisons are usually remembering 1997 and how show it was to dynamically load Perl. These days, PHP and Perl both have an interpeter directly in the webserver, and with pseudocode cashing as offered by APC, you're likely to have less overhead of program written in C/C++, unless it's actually a well written application which supports FastCGI, which basically (but not technically) does what APC does for PHP.
PHP as a cgi, though, is unlikely to be much more expensive than a non-fastcgi binary. We're not running at 200Mhz in 64MB, anymore.
That said, C is generally harder for people to shit together; there's structure, requirements, different types of formats, so it has a higher requirement of learning, so they're more likely to be constructed by somebody who has had formal experience as a programmer.
|