3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private function myPrivate() { return true; } } class Bar extends Foo {} $obj = new Bar; $reflMethod = new \ReflectionMethod($obj, 'myPrivate'); $reflMethod->setAccessible(true); $return = $reflMethod->invoke($obj); var_dump($return);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
156.18 ms | 1720 KiB | 9 Q