From:             sebastian at sebsoft dot nl
Operating system: All
PHP version:      6CVS-2008-08-10 (CVS)
PHP Bug Type:     Feature/Change Request
Bug description:  Dump list of objects/variables and their memory usage

Description:
------------
When developing on larger PHP-CLI projects, it seems that sometimes memory
usage increases while running; possibly doing nothing more than
instantiating objects/variables and replacing them by new objects/variables
but not destroying references correctly.

I would like to request a function that is able to give a dump of all
client created objects/variables that currently occupy the memory in this
instance, and if possible, the memory usage created by those
objects/variables.

This will help identifying possible memory issues while developing code.

My suggestion would be to have a php.ini setting that, when enabled,
tracks usage, so it would be possible to disable this feature in production
environments.

Something similar was already requested in bug #16564, but was closed with
a solution which doesn't give as much detail as what I am requesting in
this request.

Expected result:
----------------
A possible expected output could be an array containing the objects and
the memory usage created by them. This array could be multi dimensional to
track where the object/variable in question exists.


-- 
Edit bug report at http://bugs.php.net/?id=45778&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45778&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45778&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45778&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45778&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45778&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45778&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45778&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45778&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45778&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45778&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45778&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45778&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45778&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45778&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45778&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45778&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45778&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45778&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45778&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45778&r=mysqlcfg

Reply via email to