3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foobar { function test() { $bar = "nasty"; $closure = function($foo) use ($bar) {}; $reflect = new ReflectionFunction($closure); //print_r($reflect); print_r($reflect->getClosureThis()); print_r($reflect->getClosureScopeClass()); } } (new Foobar())->test();
based on GBHBq