Skip navigation.

PHP enterprise silliness

Sandro Zic recently gave a presentation on Java and PHP, and posted his slides here. I didn't attend his talk, so I don't have all the facts, but I would like to comment on one of his slides:

Is PHP 5 Enterprise Ready?

● Limited OO features ● Virtually no multi-threading ● Lack of maintenance tools ● Available frameworks/libraries not mature/tested/interoperable enough ● Phase of transition from PHP 4 to PHP 5 ● Growing acceptance by big companies ● PHP is for SME

First, a minor point. Limited or no OOP has rarely stopped any software from being enterprise-ready. Most modern operating systems continue to be written in C, and the large Cobol programs running on mainframes that manage your bank accounts and insurance do not use OOP.

Sandro seems to think that PHP is not enterprise ready. I was not at his presentation, but I do think it there is some confusion here between concept of a domain specific language with a general purpose language. Domain specific languages can be really lousy for everything, but so long as it has the right characteristics in its particular domain, then it becomes a good choice.

So if your application runs client/server, or does a lot of number crunching, or computer-telephony integration, PHP is a foolish choice - Java or C (which would fail Sandro's enterprise criteria) are better choices. But if your business runs on the web, is considered mission-critical and requires infinite scalability, PHP will continue to be one of the better answers.

Let's address some of his other criticisms:

Virtually no multi-threading. I do admit I would like more multi-threading features in PHP, but this is irrelevant for web development; Apache in pre-fork mode gives excellent performance and stability, and ditto for IIS in fastcgi mode.

Lack of maintenance tools. I'm not sure what Sandro means. PHP is designed to be a thin presentation layer/language around back-end objects such as databases. We use PHP to build maintenance tools for these back-end objects, eg. phpMyAdmin. We also have tools to manage Apache and the like. And we have source code tools such as CVS, editors and debuggers. Perhaps someone who attended the talk can clarify?

Immature frameworks. I think there are many stable and powerful frameworks out there. However Sandro is correct -- that there are also too many frameworks which are immature, untested and work poorly. In an open source bazaar, you have to be discerning to separate the jewels from the fakes.