--TEST-- ReflectionClass::getMethods() --CREDITS-- Robin Fernandes Steve Seear --FILE-- getMethods(0)); echo "Public methods:"; var_dump($rc->getMethods($pubFlag)); echo "Private methods:"; var_dump($rc->getMethods($privFlag)); echo "Public or static methods:"; var_dump($rc->getMethods($StaticFlag | $pubFlag)); echo "Private or static methods:"; var_dump($rc->getMethods($StaticFlag | $privFlag)); ?> --EXPECTF-- No methods:array(0) { } Public methods:array(4) { [0]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(5) "pubf1" ["class"]=> string(1) "C" } [1]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(5) "pubf2" ["class"]=> string(1) "C" } [2]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf1" ["class"]=> string(1) "C" } [3]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf2" ["class"]=> string(1) "C" } } Private methods:array(4) { [0]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "privf1" ["class"]=> string(1) "C" } [1]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "privf2" ["class"]=> string(1) "C" } [2]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf1" ["class"]=> string(1) "C" } [3]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf2" ["class"]=> string(1) "C" } } Public or static methods:array(6) { [0]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(5) "pubf1" ["class"]=> string(1) "C" } [1]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(5) "pubf2" ["class"]=> string(1) "C" } [2]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf1" ["class"]=> string(1) "C" } [3]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf2" ["class"]=> string(1) "C" } [4]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf1" ["class"]=> string(1) "C" } [5]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf2" ["class"]=> string(1) "C" } } Private or static methods:array(6) { [0]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "privf1" ["class"]=> string(1) "C" } [1]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "privf2" ["class"]=> string(1) "C" } [2]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf1" ["class"]=> string(1) "C" } [3]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf2" ["class"]=> string(1) "C" } [4]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf1" ["class"]=> string(1) "C" } [5]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf2" ["class"]=> string(1) "C" } }