--TEST-- Testing call_user_func inside namespace --FILE-- getMessage(), "\n"; } try { call_user_func(array(new $class, 'prot'), 'foobar'); } catch (\TypeError $e) { echo $e->getMessage(), "\n"; } } ?> --EXPECT-- string(6) "foobar" call_user_func(): Argument #1 ($callback) must be a valid callback, cannot access private method testing\foo::priv() call_user_func(): Argument #1 ($callback) must be a valid callback, cannot access protected method testing\foo::prot()