I love PHP. Don’t misunderstand that. However, oftentimes I find myself so incredibly frustrated with it that I all but give up on it. It’s biggest problem is its lack of infrastructure.
PHP has spent a lot of time being the little engine that could. Because of its ease of use, forgiving memory management, superb documentation, and, HTML embedding abilities, it empowered every moron with a copy of windows notepad to be “web programmers”. This isn’t exactly a bad thing. In fact, it’s how PHP really got it’s start. Without it, PHP wouldn’t be as popular as it is today.
PHP, however, has grown up a lot since then. Grown up so much, in fact, that most “real programmers” that use PHP curse the fact that it can be embedded in HTML at all. It’s time for PHP to gain some REAL infrastructure.
Perl started out with the same sort bang that PHP did. It empowered morons to do the job of a programmer. As Perl matured so did it’s infrastructure. Today, PERL has CPAN, an easily accessible collection of modules, libraries, and extensions that allow Perl to do bigger and better things than it was originally designed to do. Because of CPANs popularity, Perl programmers eventually learned how to code in modular fashion, began writing CPAN modules for everything, and soon the infrastructure that makes Perl even more versatile than before was born.
What if I were to tell you that PHP already had that infastructure? You’d say “Sure, PHP has PEAR, but it doesn’t really do anything”. Have you seen PEAR? Probably not. And neither have most people. PEAR works great. As easy as CPAN, if not easier, and it’ll only get better with more widespread usage.
So, just for fun, do this. You need PHP (4.2.x preferred, but 4.x should work, I think) and you must have it available as a system executable (CGI). In Debian do, apt-get install php4-cgi. Once you have php installed, type this at a command prompt:
lynx -source http://go-pear.org | php
A lot of the libraries contained in here aren’t very good. For instance, there is an XML_RSS library that sucks (as least in my very biased, I-wrote-my-own-damn-RSS-parser option). The problem is that people like me (who have written better alternatives) haven’t really begun using PEAR. If I had, installed my feedParser script would be as easy as typing pear install XML_RSS_FeedParser.