15 Mar 2000 egad   » (Journeyer)

Having swaying opinions on PHP.

Sometime I go "Hey, PHP is cool you can do this, this, and this with it"

Then I keep thinking that it's perl and try some perlism with it and have to think of the PHP'ism to make it work. Grrrrr. My major question now is why didn't they come up with a better embedded perl solution when they came up with PHP.

So here's my major PHP gripe list:

  • No module resources -- ok this is an exaggeration, there are some modules to get for PHP. But there isn't a main distribution point, and structure for PHP stuff (can someone say CPAN.) Last time I checked Python had the same problem, but I've heard that they've been working on that problem.
  • Feeping Creaturism -- Most new features in other languages get delegated out to external modules. The PHP developers keep putting more and more into the core of the language. This causes people to either have to 1) Recompile the core PHP or 2) deal with funky shared object loading to add certain parts of the language (the xml module is a good example of this.) See Perl for a good way of doing modules, and Python for a super way of abstracting them out.
  • No abstract Database Interface -- If we change databases, we have to change every single database call. That's Bad.
  • Undocumented Features -- I've only seen one case of this so far, but there is an XML function called xml_parse_into_struct it doesn't appear in any of the online documentation that I can find. It looks like an extremely useful function if you're doing XML processing. Why isn't it documented? Are there any other functions like this that aren't documented? What happens if someone has to maintain a page and needs to know exactly what the function does and cannot find it documented anywhere?

It may seem that I'm being hard on PHP, but I really do like certain aspects of it. Right now I'm going back and forth between PHP and Mason. And there are things I like from both (Mason is perl based, but has ugly variable passing IMO.)

I guess you can't please everyone all the time.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!