Return Functions/Methods in a class
Hi all,
I was wondering if there is a way of getting the list of functions inside a class in PHP4.
This would be similar to the ReflectionClass in php5.
Say for example I have:
[PHP]class testclass {
function func1() {
echo 'I am func1';
}
function func2() {
echo 'I am func2';
}
}
$ana = new Analysis('testclass');
$ana->getFunctionsList(); // should return array( 'func1', 'func2' );[/PHP]
Is there such a function in php4? or if someone knows of a way to get that information?
I was thinking of serializing the class, and then using regex to get the functions out of the serialized string, but there should be an easier way?
Thanks in advance :)
digital-ether
Nearly a Posting Virtuoso
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101
digital-ether
Nearly a Posting Virtuoso
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101