2.2.7 When not to use PHPThis is NOT the latest copy of this book; click here for the latest version.
There are two situations when I would not recommend PHP for use in a web application. Firstly, as already mentioned, if you desperately need all the performance you can get, you should be using C or C++. Both languages are unwieldy on the web, but they offer superior performance. Even in this situation you might want to consider simply writing your C code as extensions to PHP.
Secondly, if you are adding to a system which already has a lot of code already written in another language, then coding parts in PHP will only make your maintenance job more difficult, so you are likely to find it easiest in the long run to keep using the old language.
Author's Note: It's important for me to make the point that, although PHP is thread-safe, its libraries may not be. If you don't know what thread-safe means, you don't need to worry about it!
|
Want to see this stuff in print? PHP in a Nutshell takes the core topics covered here, adds in thousands of edits from the editorial team and myself, and combines them to make an unbeatable reference for PHP programmers at all levels.
My latest book has hundreds more tips on how to use PHP, Apache, and MySQL, plus Perl, Python, shell scripts, performance tuning, and more!
|