Andrey Hristov wrote: > > But dereferncing like this > $foo->bar()->fubar > is feature of Z2 or not? > Till today I didn't know that my 4.1.1(or 2) not sure can do this kind of >dereferencing.
The above quote dereference involves an intermediate method, the one described in the example below uses an object which is currently supported. > > $foo = new foo(); > > $foo->bar->set_tmp("outside foo"); > > $foo->variable = "foo"; As far as references go... I believe when you copy an object it is a shallow copy, in otherwords, the object is copied, but not its members. This behaviour is preferrable as far as I'm concerned. If you want a deep copy try doing the following: $foo = new foo(); $fee = unserialize( serialize( $foo ) ); That should provide a nice quick, clean solution for what you want while not incurring the overhead most programmers would rather skip on every object copy. Cheers, Rob. -- .-----------------. | Robert Cummings | :-----------------`----------------------------. | Webdeployer - Chief PHP and Java Programmer | :----------------------------------------------: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :----------------------------------------------: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `----------------------------------------------' -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php