I'm looking at Perl and PHP side by side for the first time. No Camel book incessantly reminding me the given answer is only "one way to do it," not torturous constructs written just 'cause. The two languages are a lot more alike than different.
Just like C and Pascal.
I actually should prefer Perl to PHP. I like pre-declaring variable. It makes you think about what resources you'll need, get them defined, understood and organized before you start. But I prefer PHP, and I figured out why. I think of PHP as a scripting language whereas I think of Perl as a programming language.
Now, for programming, creating a set of integrated functions designed to accomplish I've rejected C and all C-like languages, more because of the implementations than the languages as it turns out. For programming I use Pascal.
But I've been using C-like scripting languages forever. And I've always thought of PHP as almost a macro language, embedded in the web page.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have a few big problems with PHP:
1 - It lacks clean support for OOP, or at least it did before PHP5, which nobody's gotten round to deploying just yet.
2 - It encourages the mixing of content and presentation. I've looked at templating systems like Smarty, but so far I haven't been impressed by what I've seen.
3 - Overuse of global variables.
4 - Support for Unicode is a horrible kludge.
5 - One has to buy Zend's software to get support for caching.
Other than the above, the language is just fine! Seriously though, I can't imagine developing anything major for the web either in Perl or PHP, not when I can choose between JSP/Servlets (NOT J2EE!) and ASP.NET. PHP's fine for smaller one-off projects that need to be done in a hurry, but for anything that needs long-term maintenance and support for i18n, I'd look elsewhere.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32) - GPGshell v3.10
Comment: My Public Key is at the following URL:
Comment: http://www.alapite.net/pgp/AbiolaLapite.txt
iD8DBQFBDN2IOgWD1ZKzuwkRApEjAJ4+GsWtor3i3r2vIwDbWTWDpeeVJACeJlRu
pbDZ6y0olLUGPWawNN0/EmM=
=kGA6
-----END PGP SIGNATURE-----
I have no problem with no object oriented programming support. I learned "oop" by realizing it's just a way of implementing abstract data types. I'm supposed to say "object based programming" but that's just being fashionable.
It DOES encourage mixing content and presentation because it is, in essance, a templating system in and of itself, but I feel complaining about that is like complaining about lack of discipline. Same with global variable use (though in forcing you to declare you're using a global variable it damps down the harm that can be done. And there are several open source caching systems available for PHP; I understand mmcache is very good.
Still, my point was I'd have never considered using PHP for anything major either, especially after looking over source code for several open source portal projects. This recent deep excursion into the Drupal code base has changed my mind.