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.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to