3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo {private $a=1;} function test() { var_dump($this); } $object = new Foo; $closure = (new \ReflectionFunction('test'))->getClosure(); $closure = $closure->call($object);
based on YeDBj