3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { $that = $this; return static function() use($that) { $that->baz(); }; } private function baz() { echo 'baz'; } } $foo = new Foo(); $closure = $foo->bar(); $closure();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
167.3 ms | 3278 KiB | 8 Q