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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php