Re: [PHP] how to count objects instances

2004-08-24 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED]: > Thanks, > But im using php 4.3. Then you'll have to resort to some very unstandard methods: class foo { var $instance_manager; function getInstanceNum() { return $this->instance_manager->instancesOf(__CLASS__); } function getInstanceName() { re

Re: [PHP] how to count objects instances

2004-08-24 Thread tyler
Thanks, But im using php 4.3. Quoting Curt Zirzow <[EMAIL PROTECTED]>: > * Thus wrote Robert Cummings: > > On Mon, 2004-08-23 at 20:54, John Holmes wrote: > > > [EMAIL PROTECTED] wrote: > > > > > > You could write a wrapper class for Test that kept count of the > > > instances and returned a ne

Re: [PHP] how to count objects instances

2004-08-24 Thread Daniel Schierbeck
Curt Zirzow wrote: * Thus wrote Robert Cummings: On Mon, 2004-08-23 at 20:54, John Holmes wrote: [EMAIL PROTECTED] wrote: You could write a wrapper class for Test that kept count of the instances and returned a new object upon request... In PHP5: class Foo { static $instances = 0; function

Re: [PHP] how to count objects instances

2004-08-24 Thread Daniel Schierbeck
Robert Cummings wrote: On Mon, 2004-08-23 at 20:54, John Holmes wrote: [EMAIL PROTECTED] wrote: hi, What is best method(if it's possible) to count how many times an object is instanced in one time script call? I means that if i have a class named "Test", i what to know how many times she's called,

Re: [PHP] how to count objects instances

2004-08-23 Thread Robert Cummings
On Mon, 2004-08-23 at 20:33, Curt Zirzow wrote: > * Thus wrote Robert Cummings: > > On Mon, 2004-08-23 at 20:54, John Holmes wrote: > > > [EMAIL PROTECTED] wrote: > > > > > > You could write a wrapper class for Test that kept count of the > > > instances and returned a new object upon request...

Re: [PHP] how to count objects instances

2004-08-23 Thread Curt Zirzow
* Thus wrote Robert Cummings: > On Mon, 2004-08-23 at 20:54, John Holmes wrote: > > [EMAIL PROTECTED] wrote: > > > > You could write a wrapper class for Test that kept count of the > > instances and returned a new object upon request... > > In PHP5: > > > class Foo > { > static $instances

Re: [PHP] how to count objects instances

2004-08-23 Thread Robert Cummings
On Mon, 2004-08-23 at 20:54, John Holmes wrote: > [EMAIL PROTECTED] wrote: > > hi, > > What is best method(if it's possible) to count how many times an object is > > instanced in one time script call? > > I means that if i have a class named "Test", i what to know how many times she's > > called, h

[PHP] PHP Runtime Debugger (Was: [PHP] how to count objects instances)

2004-08-23 Thread Michal Migurski
> There's no predefined variable or method for determining this, that I'm > aware of, short of counting how many "new Test" lines you have. > > You could write a wrapper class for Test that kept count of the > instances and returned a new object upon request... A slightly more general question: ar

Re: [PHP] how to count objects instances

2004-08-23 Thread John Holmes
[EMAIL PROTECTED] wrote: hi, What is best method(if it's possible) to count how many times an object is instanced in one time script call? I means that if i have a class named "Test", i what to know how many times she's called, how many copies exists etc. The idea is for monitoring in the way to op

[PHP] how to count objects instances

2004-08-23 Thread tyler
hi, What is best method(if it's possible) to count how many times an object is instanced in one time script call? I means that if i have a class named "Test", i what to know how many times she's called, how many copies exists etc. The idea is for monitoring in the way to optimizing the code. The m