3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_func($arg1 = 'a', $arg2 = 'b', $arg3 = 'c', $arg4 = 'd') { return json_encode([ 'func_num_args' => func_num_args(), 'func_get_args' => func_get_args(), 'direct_args' => [$arg1, $arg2, $arg3, $arg4], ], JSON_PRETTY_PRINT); } echo test_func('hello', 'b', 'world');
Output for git.master, git.master_jit, rfc.property-hooks
{ "func_num_args": 3, "func_get_args": [ "hello", "b", "world" ], "direct_args": [ "hello", "b", "world", "d" ] }

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:
28.71 ms | 405 KiB | 5 Q