Re: Get reference count on a variable.

From: Date: Sat, 21 Aug 2004 19:28:56 +0000
Subject: Re: Get reference count on a variable.
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-194406@lists.php.net to get a copy of this message
Robert Cummings wrote:
On Sat, 2004-08-21 at 14:38, Daniel Schierbeck wrote:
Robert Cummings wrote:
In PHP5 to get a copy of, versus a reference to, an object the developer must call the __clone() method for the target object: $obj = new Foo(); $copyNotReference = $obj->__clone();
The correct syntax for that is: $obj = new Foo; $copyNotReference = clone $obj;
Ahh cool. I guess I was reading an old document. Perhaps from before a keyword was added for better code clarity :) Cheers, Rob. Hehe, no problem mate. By the way, does anyone know what happened to the "delete" keyword? I saw it in a Zend article before the final release of PHP 5, but i can't find it anywhere.
Ooops, off-topic, soory ;) Best regards, Daniel

« previous php.general (#194406) next »