Re: Classes and Functions

From: Date: Wed, 04 Nov 2009 14:44:26 +0000
Subject: Re: Classes and Functions
References: 1  Groups: php.general php.general 
Request: Send a blank email to php-general+get-299608@lists.php.net to get a copy of this message
Daniel Kolbo wrote:
Hello, Is there a way to see what objects and functions a script loaded/required/used? I could recursively loop through the globals, but if objects were unset, then i may miss some. I could make a 'tracking' object and every time i load/include a file (which contains a class def or a function def) to add that file to the tracking object...but it would be nice if i didn't have to modify my existing code to see which objects and functions a script actually used, or at least, requested and loaded into memory. Thanks in advance, Daniel Kolbo `
if it's for debugging, get a good debugger so you can inspect at break points; for use during runtime and something "scripted" you can call the relevant get_defined/declared functions before before your app does it's loading, then the same later on and compare to get a definitive list. also worth asking if you're refering to objects (as in instances) or classes. Object = instance of a Class [ $object = new Class() ]

« previous php.general (#299608) next »