PHP 5

From: Date: Tue, 05 Feb 2002 09:14:47 +0000
Subject: PHP 5
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-4534@lists.php.net to get a copy of this message
Hi, We need to start dealing with ZE2/PHP 5, if we want to make a migration path, or just break everything and go for PHP 5. PHP 5 will contain some features that PEAR needs: namespaces, exceptions, more efficient object handling, better object overloading. Some of these features are there because of PEAR, so we better start using them ;-) Anyway, here are the major issues: 1. Namespaces: we should migrate our current naming scheme to a namespace-based one. HTML_Form becomes HTML::Form, and so on. This can not be done in a portable way without automatically converting files, or something like that. We could provide a code "downgrading" tool converting from PHP 5 to PHP 4 syntax, and integrate it in either the packaging or installation process. 2. Package names: IMHO packages should be renamed according to the namespace format for consistency. This should work for PHP 4 as well. 3. Exceptions: PEAR_Error will be deprecated in favor of exceptions. This should be possible to do in a portable way if people use raiseError() (which would simply throw an exception), but I'm not 100% sure where the compatibility should be. It may end up in the PEAR_Error() constructor. However, any code using throw/catch will of course not run in PHP 4. 4. Object overloading, aggregation: this doesn't really have any compatibility problems, but it does provide new possibilities that could be exploited during design to write more efficient code. And the $10,000 question: how much work should we put into giving people a smooth migration path? I would like to get everyone running PHP 5 ASAP, but this is of course utopic. I'd like to hear peoples' opinions on this. - Stig

« previous php.pear.dev (#4534) next »