Find all references to an object |
|
I am trying to delete an object, however, there is still some existing reference to it and thus PHP's garbage collector is not deleting it and the object's destructor is not being called. I've searched how to determine existing references to an object, and the only think I found was https://www.php.net/manual/en/features.gc.refcounting-basics.php which states that xdebug must be installed. Before doing so, please advise whether latest version of phpED has the ability to gather this information. This old post http://forum.nusphere.com/what-is-a-soft-reference-t1232.html references "soft links" which sounds somewhat related, but current versions of phpED do not appear to display. Thanks
|
||||||||||||
|
Site Admin
|
You can use debug_zval_dump() that's available in php core and therefore does not require any extensions. It prints variable and reference counter value.
https://www.php.net/manual/en/function.debug-zval-dump.php Note that if you have a variable in current context, its ref cout can't be zero, otherwise it would have already been deleted. |
||||||||||||
_________________ The PHP IDE team |
Find all references to an object |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by