Is PHP4 the new perl?

Original post provide by PHP Everywhere - By John Lim

Tim Bray, one of authors of XML, voices concern about PHP:

If you want your ears bent back, have a listen to Zend CEO Doron Gerstel; he’ll tell you that half the websites in the world are powered by PHP and that there are 2½ million developers and that the war is over and PHP won. So here’s my problem, based on my limited experience with PHP (deploying a couple of free apps to do this and that, and debugging a site for a non-technical friend here and there): all the PHP code I’ve seen in that experience has been messy, unmaintainable crap. Spaghetti SQL wrapped in spaghetti PHP wrapped in spaghetti HTML, replicated in slightly-varying form in dozens of places.

But in the big picture, it feels vulnerable to me.

Vulnerable? I think Tim Bray misses a key point…

The fact is that most Javascript, HTML and PHP (or ASP or Perl for that matter) out there is messy, unmaintainable crap. And that’s why all the above technologies are so popular. They can be used by ordinary people with minimal training. Conversely, you can write clean, maintainable Javascript, HTML and PHP too, but it takes education, discipline and willpower — not everyone is creating enterprise web-sites where everything is rigorously defined. Read the discipline of PHP.

As a corollary, one of the probable reasons the takeup of PHP5 is so slow is because PHP4 provides sufficient hacking power already. I think PHP5 is more attractive to people who want to code with rigor.

So is PHP4 perl for the web? PHP can be used or abused, just like perl. The abuse is what makes it popular :)

Previous Articles:
Yahoo! Goodies: UI Library And Design Patterns
Yahoo has recently released their Design Pattern Libary. As they mention on their site: Welcome to the Yahoo! Design Pattern Library. We are very happy to be sharing our library with the design and development community. This is our first drop of what we hope to be a monthly release cycle for the publication of patterns.
PHP Life : The Oracle
After a short break the PHP Life team are back. In this strip we look at the Zend/Oracle deal. If Oracle do buy-out Zend then let's hope things fare better for the Zend staff than Oracle staff at the moment!
PHP @ FrOSCon: Call For Papers
The Free and Open Source Conference (FrOSCon) 2008 is a two-day conference on free software and open source. It will take place on August, 23th and 24th 2008 in Sankt Augustin near Bonn, Germany.The PHP Usergroups Dortmund, Köln/Bonn and Hamburg are cooperatively organizing the PHP track as a sub-conference of the FrOSCon.
Improving Performance Through Persistent Connections
The concept of persistent database connections is a question mark for many PHP developers. When exactly is it a wise decision to use them?
Vector Graphics In Javascript
This is impressive. A vector graphics library built using div layers and javascript. The mind boggles at what is possible: function graphing.
More Articles:
Inserting Multiple Rows With One Database Call Using PHP And Oracle Collections
How to use Oracle collections to improve the efficiency of PHP scripts that feature multi-row inserts
Why I Like PHP Revisited
True Javascript isn't perfect either but we all use it for designing user interfaces and web apps. And if we can accept Javascript (an admitted hack by its designer) as a language for enterprise use, then it seemed obvious to me that there was no reason why PHP isn't suitable for the Enterprise: PHP has a familiar C-style syntax, it scales, PHP has builtin support for the template pattern (the very heart of MVC if you like it), you can write modular code, use inheritance, and code in teams.
PHP Compilers
The .NET framework Phalanger, a PHP to MSIL compiler (added 22 Dec 2005). The original mod_php from php.net. The PHP4Mono compiler for Mono (added 27 Feb 2006). I am excited about all these implementations. Most computationally intensive compiler benchmarks have shown a 5-10 times speedup over mod_php.
Paris Forum 2007 : Call For Papers
This email must contain the following information: namecompany if applicablea short (4-6 sentences) biography about your PHP experiencecomplete name and addressinclude photo for each speaker (JPEG format)Sessions will typically be 45 minutes long followed by a 10 minutes Q&A session.You are allowed to submit several proposals.
Steve Yegge On Strong And Weakly Typed Languages
Steve Yegge compares Perl and Java usage in Amazon in Is Weak Typing Strong Enough? An interesting read from someone who is a Java proponent. I still have some doubts. Do weakly-typed systems have inherently lower scalability? Do they tend to dissolve into vast typeless traps at a certain size, as the static camp would have you believe?

Leave a Reply