3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {private $a=1;} class Bar { function test() { var_dump($this); } } $closure = (new \ReflectionMethod('Bar','test'))->getClosure(new Bar); $object = new Foo; $closure = $closure->bindTo($object, get_class($object)); $closure();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
152.94 ms | 2712 KiB | 9 Q