3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo($a, ...$arg) { print_r(func_get_args()); print_r($arg); print_r($a); } function goo(...$arg) { print_r(func_get_args()); print_r($arg); } foo(...[ 'b' => 2, 'a' => 1,'d' => 3]); print PHP_EOL; print PHP_EOL; goo(...[ 'b' => 2, 'a' => 1,'d' => 3]);
Output for git.master, git.master_jit
Array ( [0] => 1 ) Array ( [b] => 2 [d] => 3 ) 1 Array ( ) Array ( [b] => 2 [a] => 1 [d] => 3 )

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:
38.88 ms | 860 KiB | 4 Q