Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Daniel Schierbeck
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

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Robert Cummings
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

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Daniel Schierbeck
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 = cl

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Robert Cummings
On Sat, 2004-08-21 at 11:21, Curt Zirzow wrote: > * Thus wrote Robert Cummings: > > > > As exemplified in the sample script I sent in my last response and by > > the link sent by Hannes Magnusson, in PHP5 the following have identical > > behaviour: > > > > $o1 = new Foo(); > > $o2 = $o1;

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Curt Zirzow
* Thus wrote Robert Cummings: > > As exemplified in the sample script I sent in my last response and by > the link sent by Hannes Magnusson, in PHP5 the following have identical > behaviour: > > $o1 = new Foo(); > $o2 = $o1; > > // Is same as... > > $o1 = new Foo(); > $o2 =&

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Robert Cummings
On Sat, 2004-08-21 at 10:24, Curt Zirzow wrote: > * Thus wrote Robert Cummings: > > On Sat, 2004-08-21 at 00:10, Curt Zirzow wrote: > > > * Thus wrote Robert Cummings: > > > > Hi All, > > > > > > > > I think I'm looking for something that doesn't exist, but just in > > > > case thought I'd che

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Curt Zirzow
* Thus wrote Robert Cummings: > On Sat, 2004-08-21 at 00:10, Curt Zirzow wrote: > > * Thus wrote Robert Cummings: > > > Hi All, > > > > > > I think I'm looking for something that doesn't exist, but just in > > > case thought I'd check the list. Does anyone know if a PHP function > > > exists t

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Hannes Magnusson
On Sat, 21 Aug 2004 04:10:53 + [EMAIL PROTECTED] (Curt Zirzow) wrote: > * Thus wrote Robert Cummings: > > Hi All, > > > > I think I'm looking for something that doesn't exist, but just in > > case thought I'd check the list. Does anyone know if a PHP function > > exists to get the number

Re: [PHP] Get reference count on a variable.

2004-08-20 Thread Robert Cummings
On Sat, 2004-08-21 at 00:10, Curt Zirzow wrote: > * Thus wrote Robert Cummings: > > Hi All, > > > > I think I'm looking for something that doesn't exist, but just in > > case thought I'd check the list. Does anyone know if a PHP function > > exists to get the number of references on a given va

Re: [PHP] Get reference count on a variable.

2004-08-20 Thread Curt Zirzow
* Thus wrote Robert Cummings: > Hi All, > > I think I'm looking for something that doesn't exist, but just in > case thought I'd check the list. Does anyone know if a PHP function > exists to get the number of references on a given variable's data? I was > hoping to create a way for a factory

[PHP] Get reference count on a variable.

2004-08-20 Thread Robert Cummings
Hi All, I think I'm looking for something that doesn't exist, but just in case thought I'd check the list. Does anyone know if a PHP function exists to get the number of references on a given variable's data? I was hoping to create a way for a factory to automatically recycle resources without