3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function test() { echo $undef; } public function test2() { $x = $this; // use $this echo $undef; } } set_error_handler(function($_1, $_2, $_3, $_4, $ctx) { var_dump(isset($ctx['this'])); }); (new Foo)->test(); (new Foo)->test2();

preferences:
24.56 ms | 405 KiB | 5 Q