3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function qux() { $this = new stdClass(); return function () use($this) { return $this; } } } var_dump(call_user_func(Foo::qux()));
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.30
Fatal error: Cannot re-assign $this in /in/RJg4Q on line 7
Process exited with code 255.

preferences:
184.24 ms | 1386 KiB | 67 Q