Re: [ANNOUNCEMENT] DB-1.7.13 (stable) Released.

From: Date: Sun, 23 Sep 2007 20:39:12 +0000
Subject: Re: [ANNOUNCEMENT] DB-1.7.13 (stable) Released.
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48134@lists.php.net to get a copy of this message
--On September 21, 2007 Sep 21, 15:16.43 +0000 PEAR Announce <pear-dev@lists.php.net> wrote: > * Replaced instances of '=& new Foo' with '= new Foo' to make DB > (slightly) > more E_STRICT friendly. Request 11581. All, Could someone hit me with the clue-bat on this. just send me off to rtfm if this is explained clearly in one spot. :) I know that "$x =& new Foo()" is 'out' in php5. but in PHP4, the "$x =& new Foo" construct used to make a new Foo instance, then make $x refer to that instance. And "$x = new Foo" use to make a new Foo, then make $x be a *copy* of that new Foo. I have this vague recollection of falling over this in some project. I had used the "$x = new Foo" contruct and took me a while to discover there were really two Foo instances in that one line of code. When I changed to =& my problem was resolved. So I dutifully started "=& new" all my objects in php4 so my questions: - is my understanding above, in php4 context, correct? (I have legacty code to maintain ya know.) - and how does "$x = new Foo" work in php5? does it 'just work correctly' thus we no longer needed the "$x =& new Foo" from php4. -c

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