3v4l.org

run code in 300+ PHP versions simultaneously
<?php function numbers($first, $second, ...$third) { // echo ($numbers['numbers'] ?? $numbers[0])[1]; var_dump(func_get_args()); echo '---------------' . PHP_EOL; var_dump($first, $second, $third); echo '-=-=-=-=-=-=-=' . PHP_EOL; } numbers(1, 2, [3, 4]); numbers(1, 2, numbers: [3, 4]); numbers(second: 2, first: 1, third: [3, 4]);
Output for git.master_jit, git.master
array(3) { [0]=> int(1) [1]=> int(2) [2]=> array(2) { [0]=> int(3) [1]=> int(4) } } --------------- int(1) int(2) array(1) { [0]=> array(2) { [0]=> int(3) [1]=> int(4) } } -=-=-=-=-=-=-= array(2) { [0]=> int(1) [1]=> int(2) } --------------- int(1) int(2) array(1) { ["numbers"]=> array(2) { [0]=> int(3) [1]=> int(4) } } -=-=-=-=-=-=-= array(2) { [0]=> int(1) [1]=> int(2) } --------------- int(1) int(2) array(1) { ["third"]=> array(2) { [0]=> int(3) [1]=> int(4) } } -=-=-=-=-=-=-=

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:
33 ms | 406 KiB | 5 Q