The PHP Scalability Myth
Subject:   Java and PHP
Date:   2007-07-25 14:57:20
From:   Storm14k
Response to: Java and PHP

I know this is older but I still see this argument with regards to php and I do not believe it has merit.

Even prior to the advances made in php's OOP capabilities the file include flexibility of the language would allow you to achieve enough seperation to avoid this type of situation. The code and necessary html to represent a particular item could be written in one file and included where needed. Control variables could be used to handle differences between individual instances. And if the database connection was a problem DB::PEAR could have been used. To me it seems like most of the code/presentation/maintainability arguments against php stem from lack of a full understanding of the language and its capabilities.

On another note I have yet to see what I would actually consider true separation of code and presentation as it is hyped by other languages when compared to php (mainly If you are putting anything in your html besides html then you are mixing code and presentation. It doesn't matter if its a php while loop, smarty template tag or an or jsp tag. They all do the same thing...loop over a piece of html and inject data values in place of place holders.