3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $a; public function foo() { strtolower( function() { set_error_handler(function() {}); $class = get_called_class(); restore_error_handler(); return $class; }()); $f = function() { }; $f(); } } $a = new A; $a->foo();
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
Parse error: syntax error, unexpected '(' in /in/h2Rtd on line 12
Process exited with code 255.

preferences:
182.64 ms | 1399 KiB | 62 Q