NYCPHP Meetup

NYPHP.org

[nycphp-talk] 2 more php5 questions ...

Adam Maccabee Trachtenberg adam at trachtenberg.com
Tue Feb 17 19:02:58 EST 2004


On Tue, 17 Feb 2004, jon baer wrote:

> > My biggest problem with PHP 5 is that nobody is really using it. (I
> > don't have any hard numbers on this, just a gut instinct.) In many
> > ways, PHP 4 is "good enough," so people (like Hans) haven't felt the
> > need to switch their codebase over.
>
> i highly doubt that ... im sure when a final PHP 5.0 is available people
> will flock and install it, its when you have a change log a mile long with
> each release that people get worried, in fact JSP was pretty much like that,
> the spec stayed inside Sun for sooooooooo long and people were eager to use
> the new features ... plus Im sure nyphp.org will be the first site to
> showcase cool stuff w/ PHP5 ;-)

This is exactly my point. There are a lot of changes in PHP 5, but
they're not getting any real-life field testing before PHP 5 goes
final. This worries me because the time to find the big mistakes is
during the Beta period. (Or earlier, of course.)

IMHO, this is the biggest change to PHP since Ramsus combined PHP and
FI to create PHP/FI (aka PHP 2.). PHP 3 was pretty much PHP 2 with a
better parser and the ability to more easily write extensions (and
minor psuedo-object support). PHP 4 was PHP 3 with a better
parser. PHP 5 is PHP 4 + Real Objects + Exceptions + Interfaces +
Rewritten MySQL extension + All new XML extensions.

In other words, this is the first version of the language that adds
lots of language-level features instead of just concentrating on
behind-the-scenes improvements. (Well, except for PHP 3 changing the
string concatenation operator to "." from "+".) There's a lot of new
stuff and all of the changes materially affect your code.

For instance, do you know that you:

1) Can't run PHP 4 and PHP 5 on the same web server?
2) Need to port all your DOM and XSLT code to use it in PHP 5?
3a) Can *only* use the new MySQL extension, mysqli, with MySQL >= 4.1?
3b) Can *only* use the old MySQL extenion, mysql, with MySQL <= 4.0?
3c) The mysqli extension eliminates (and changes) some functions from
mysql, so porting code isn't just s/mysql/mysqli/g?
3d) Neither set of MySQL libraries are bundled anymore with PHP, so
you need to install these yourself?

PHP 5 has lots of cool new toys, but the transition process will mean
that you can't necessarily download some PHP 4 (or even PHP 5) code
and start using it because, for example, you're still running MySQL
4.0 and haven't yet upgraded because you don't want to modify your PHP
code. (And don't want to run two databases and two web servers.)

I don't want to sound negative because I think PHP 5 is really
cool. It's just that I wish more people were out there because I want
the new features to get some heavy duty stress testing.

-adam

-- 
adam at trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!



More information about the talk mailing list