3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function t() { return function(){ var_dump($this); }; } } $a = new Test(); $f = $a->t(); $f();

preferences:
12.07 ms | 458 KiB | 5 Q