3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(array... $args) { var_dump($args); } test(); test([0], [1], [2]); test([0], [1], 2); ?>
Output for git.master, git.master_jit, rfc.property-hooks
array(0) { } array(3) { [0]=> array(1) { [0]=> int(0) } [1]=> array(1) { [0]=> int(1) } [2]=> array(1) { [0]=> int(2) } } Fatal error: Uncaught TypeError: test(): Argument #3 must be of type array, int given, called in /in/UoSc9 on line 9 and defined in /in/UoSc9:3 Stack trace: #0 /in/UoSc9(9): test(Array, Array, 2) #1 {main} thrown in /in/UoSc9 on line 3
Process exited with code 255.

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:
44.06 ms | 402 KiB | 8 Q