--TEST-- A private method can be registered from the right context with set_new_overload() --SKIPIF-- --FILE-- set_overload()); var_dump(get_class(new Bar)); --EXPECTF-- Warning: set_new_overload() expects parameter 1 to be a valid callback, cannot access private method CB::callback() in %s on line %d NULL string(3) "Bar" bool(true) string(3) "Foo"