You have a va开发者_JAVA百科riable:
$a = 0;
And this variable is passed by reference like crazy.
How do you log or gain all functions and methods that have been working on this variable?
You can use xdebug to do reference counting (http://php.net/manual/en/features.gc.refcounting-basics.php) but I don't think there is a way to determine where those references were created. I think you'd have to write your own PHP module to get that information.
精彩评论