To view parent comment, click here.
To read all comments associated with this story, please click here.
That's just it - PHP is too easy. It's easy to sit down and start using it - but the downside to that it can easily be used without the skills to do a good job of it. Both good code and bad code can be written in any language, but some encourage good practices more than others do. PHP isn't one of those.
Thinking about it Python, Perl and PHP are all just as easy in terms of actual programming.
PHP is just easy because its everywhere, the cheapest hosting companies provide on their cheapest accounts. Its was also easy because of globals being on and many other conveniences that were insecure in design.
I'm afraid I find it hard to see the phrases "PHP" and "proper object oriented language" together in the same sentence without gagging.
It's like saying Visual Basic is a programming language...
PHP was great, up until about PHP3, where it was primarily an HTML Templating language, and it did this very well. After that, shoddy language design -- or perhaps uncontrolled feature-creep -- meant you ended up with a messy object orientation system and the biggest screw-up since Python disallowed Array.join as well as String.join: PHP's (in)equality testing...
That alone should get some people removed from the gene pool, three generations ago.
PHP 5 OO is hardly messy. It may not have the purity of OO that Ruby has but its fully featured and works well. Its also fast compared to the competition.
PHP's biggest problem was always insecure defaults i.e. convenience over security. PHP 6 should fully rectify this issue.
How can you even ask that? Take a BASIC interpreter from the 80s and embed it in a web server. Dump several hundred functions into one global namespace. Bolt on an ill-conceived, half-assed object model. Hand it to a bunch of nonprogrammers... and you've got PHP.
You can't blame all of its many shortcomings on the clods who use it. They're too busy trading javascript snippets, cookbook fashion, on "web developer" sites to have made the mess that is PHP all by themselves.
Edited 2008-10-14 21:22 UTC
I don't see how you can compare the two. PHP is a templating language and Python is not, so in order to do a compare, you'd have to compare PHP against a Python based templating system like Mako, Cheetah, Kid, or Django templates.
In the case of Django templates (which is what I'm most familiar with) the business logic is not allowed to be included in the presentation. It simply can't happen. This is good. With PHP, it does happen and results in some crappy, hard to maintain code.






Member since:
2005-07-06
But will PHP be able to shake the casual structure that encourages beginners to whip up spaghetti code? Will it be able to continue to mix the presentation layer and the application layer without driving everyone insane? Will Zend's collection of server optimizations provide enough performance to overcome any limitations of the language?
That stuff really turned me off of PHP.
How does PHP encourage this any more the Python. PHP just happened to get picked up by a lot of people with limited ability. PHP was just too easy. Fast forward to today and PHP5 is a proper object orientated language. The Zend Framework and countless others are what Django / Turbo Gears is to Python.
Now look at the documentation for the Zend Framework, look at the certification, look at the support and its clear if want to build a serious product and maintain it over many, many years PHP/Zend/Zend Framework are clearly superior even if Python is a better language.[i][/i]