3v4l.org

run code in 300+ PHP versions simultaneously
<?php function call($f) { return $f(); } class A { protected $a; public function foo() { strtolower( call(function() { set_error_handler(function() {}); $class = get_called_class(); restore_error_handler(); return $class; })); $f = function() { }; $f(); } } $a = new A; $a->foo();

preferences:
40.34 ms | 402 KiB | 5 Q