ID: 45778 Updated by: [EMAIL PROTECTED] Reported By: sebastian at sebsoft dot nl -Status: Open +Status: Wont fix Bug Type: Feature/Change Request Operating System: All PHP Version: 6CVS-2008-08-10 (CVS) New Comment:
That's not possible with the way PHP manages its memory. You can use XDebug (www.xdebug.org) and some frontend like kcachegrind or wincachegrind to get memory profiling of your application, then you can see where the memory usage increases. Please refer to general PHP or XDebug support facilities (php.net/support.php) for further assistance. Previous Comments: ------------------------------------------------------------------------ [2008-08-10 12:16:48] sebastian at sebsoft dot nl 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 this bug report at http://bugs.php.net/?id=45778&edit=1