<?php class Foo { function __call($name, $args) { switch ($name) { case 'bar': return 42; } } } $foo = new Foo(); var_dump(call_user_func([$foo, 'bar'])); $rc = new ReflectionClass(Foo::class); var_dump($rc->getMethods()); var_dump($rm = new ReflectionMethod($foo, 'bar'));
You have javascript disabled. You will not be able to edit any code.