Hudzilla.org - the homepage of Paul Hudson
Contents > Introducing PHP > Advantages of PHP Wish List | Report Bug | About Me ]

2.2.7     When not to use PHP

This 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!





<< 2.2.6 When to use PHP   2.2.8 Selling PHP to your boss >>
Table of Contents
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!



Top-right shadow
 
Bottom-left shadow Bottom shadow

Comments from other readers
Another PHP User - 30 Aug 2008

Perhaps it is mentioned later in the book...
I dont know about that, so i wont worry :)
There is always google, so no need for a link...

Smartdog - 30 Aug 2008

I have to agree with the user above("A PHP User" -22 Nov 2005)
I thought to myself -"How do I know if I have to worry about thread-safe, if I don't know what it is.

This is a good chance to educate the reader of this fine text :-)

A PHP User - 30 Aug 2008

<quote>If you don't know what thread-safe means, you don't need to worry about it!</quote>
I didn't like it, it's better to give a link for further reading, it's great book and I was shocked when I reached that line...



Add comment
Please note that by posting a comment here you are committing it to the public domain. This is important so that others can make use of your code themselves, and also so that I can incorporate helpful notes directly into the main text. Comments are limited to 2000 characters in length.

If you are reporting an error in the content, please tell me directly.

Your name/email address:
Your comment:
 
Now, in order to verify that you're a real person, please answer this simple question: what is three plus nine?
The answer is:
(please write in
numbers, eg 19)


Top-right shadow
 
Bottom-left shadow Bottom shadow