Tuesday, January 18, 2005

PHP !?!

Over the past few months I've had this impulse to look at PHP. Perhaps it came from seeing the ".php" extension in a lot of places. But usually I could just lie down for awhile and this impulse would pass. After all, PHP is the web language for the unwashed masses, right?

I just skimmed through the PHP tutorial, mostly looking at Objects, exceptions, that kind of thing. Classes in PHP5 have a syntax that's sort of a weird amalgam of Java, C++ (at least, the scope resolution operator), Python and Perl.

I discovered that I didn't run screaming in disgust from PHP. I didn't find it offputting; the fact that they lifted syntax from these other languages was not only reassuring (they didn't feel the need to invent everything from scratch, but instead stole proven syntax from elsewhere), but made me think that the time-to-productivity with this tool could be quite short because I know the syntax from elsewhere. The fact that PHP is designed to solve the web problem, and just the web problem (although I've heard that people have used it to create desktop applications), is also appealing. I'm sure I'll continue to run Zope for its basic functionality, and for things I can do with simple Python Scripts, but I just don't seem to be able to keep all the arcana necessary for Zope programming in my head, and I'm convinced only full-time Zope programmers have actually waded through the slings and arrows of the ill-kept Zope documentation and really know what's going on, because they use it on a day-to-day basis. I'm also interested in looking at Quixote, but as many have pointed out, no really standard Web system for Python has arisen; on the contrary, more seem to appear on a regular basis. And for my needs, I just want something that's a straightforward solution to creating interactive web pages, and I don't want to have to remember a completely different world view every time I have to go back and build new web stuff (this is why Quixote is intruiging -- it's basically Python with help).

The only thing that gave me a slight lurch in the PHP syntax is the Perlish $ in front of variables. But my concern was that it was going to be all Perl from then on, and that didn't happen. It seems to be a fairly isolated case, and the absence of the rest of the Perl syntax it really isn't an issue.

So I'm intruigued, and will probably want to experiment with it. Once the Java book is done. Enough distractions, back to it.