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");
Output for git.master, git.master_jit, rfc.property-hooks
doesn't exist, sorrystring(17) "Test::myProtected" string(5) "hello" Hello Nico

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
70.74 ms | 401 KiB | 8 Q