> 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: are there any PHP development
environments that let you do something like a core dump, to see what kind
of memory usage or variable allocation you have going on? Maybe a
compilation option to PHP? A search of google turns up DBG and some
commercial packages, but I lack the experience with such tools to evaluate
them intelligently.

I've done something like what the OP is asking about, by adding a log()
feature and calling it when objects are instantiated or destroyed, but it
sure would be nice to see something like this built-in.

I'm a gdb beginner, but I'm willing to learn. I realize that this is a
fairly complex problem compounded by the fact that PHP is generally a
library used within an apache child process.

Any thoughts?

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html

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

Reply via email to