3v4l.org

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

preferences:
37 ms | 402 KiB | 5 Q