3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public static function myStaticFunc() { var_dump(__METHOD__); } } function call(callable $func) { $func(); } $callFunction = 'call'; $callFunction('myclass::myStaticFunc'); $callFunction = 'myclass::myStaticFunc'; $callFunction(); $callFunction = 'myclass::unkownFunc'; $callFunction();

preferences:
24.36 ms | 404 KiB | 5 Q