3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __call($name, $arguments) { echo("i don't want to be in here :-("); } public static function __callStatic($name, $arguments) { echo('i want to be in here, but how?'); } public function instanceMethod() { // objective: call a non-existing static method, // so that eventually __callStatic is called and // can take care of things forward_static_call(['A', 'test']); } } (new A())->instanceMethod();

preferences:
40.93 ms | 402 KiB | 5 Q