3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected static function myProtected($test) { var_dump(__METHOD__, $test); } public static function __callStatic($method, $args) { switch($method) { case 'foo' : echo 'You have called foo()'; var_dump($args); break; case 'helloWorld': echo 'Hello ' . $args[0]; break; case 'myProtected': return call_user_func_array( array(get_called_class(), 'myProtected'), $args ); break; default: echo "doesn't exist, sorry"; break; } } } Test::notFound(); Test::myProtected("hello"); Test::helloWorld("Nico");

preferences:
103.01 ms | 402 KiB | 5 Q