Re: PEAR CS poll

From: Date: Fri, 08 Oct 2004 22:18:39 +0000
Subject: Re: PEAR CS poll
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33720@lists.php.net to get a copy of this message
On Sat, Oct 09, 2004 at 12:06:45AM +0200, Klaus Guenther wrote: > What's the difference? Isn't the php5 default to pass by reference? Well, in a way you pass a "handle" by copy. So you copy the handle, but both handles point to the same object. The difference is: $foo = new Class; $bar =& $foo; $bar = "bar"; var_dump($foo) will say "bar". Without the &, it will still be an object of the class Class. But as you only copy a handle, both $foo and $bar point to the same object. -- Regards, Stefan Walk <swalk@prp.physik.tu-darmstadt.de>

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