views:

210

answers:

2

Is there an equivalent of get_defined_functions() which only shows the functions of a given object?

Example usage and output:

class A {
    function foo() { }
    function bar() { }
}
class B extends A {
    function foobar() { }
}
$b = new B();
print_r(get_object_functions($b));

// Array (
//  0 => "foo",
//  1 => "bar",
//  2 => "foobar"
//)
+3  A: 

Ah I found it:

get_class_methods()

nickf
A: 

You could use reflection...

Rob