Re: PEAR & PHP 4.0.0
| From: | (Stig Sæther Bakken) | Date: | Tue, 24 Apr 2001 08:10:33 +0000 |
| Subject: | Re: PEAR & PHP 4.0.0 | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-303@lists.php.net to get a copy of this message | ||
[Hans Westerbeek <hw@xs4all.nl>]
> On 23 Apr 2001, Stig [iso-8859-1] Sæther Bakken wrote:
>
> > [ed@vitebsk.net (Ed V. Bartosh)]
> > > Hi,
> > >
> > > I'm playing with PEAR DB layer under PHP 4.0.0.
> > > It works fine, but only one thing isn't working :
> > > php 4.0.0 doesn't uderstand a couple of constructions
> > > in DB.php : "@$obj = & new $classname;".
>
> I'd suggest using switch($classname) and then casing every known class
> instead of this rather strange statement (when you think of it). If PHP
> had required compilation, the compiler wouldn't be able to detect a
> possible error in code like this...
>
> Ah well myabe i'm being academic ;-)
The idea is that DB.php should not be modified if someone adds support
for a new databsae. I don't know which is more academic. :-)
- Stig
--
Stig Sæther Bakken <ssb@fast.no>
Fast Search & Transfer ASA, Trondheim, Norway