3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($x, ...$array) { print_r($x); print_r($array); } $a = ['w' => 'w', 'x' => 'x']; foo(...$a); print_r(array_merge(...$a)); // array_merge() does not accept unknown named parameters
Output for git.master_jit, git.master
xArray ( [w] => w ) Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in /in/miPmk:12 Stack trace: #0 /in/miPmk(12): array_merge(w: 'w', x: 'x') #1 {main} thrown in /in/miPmk on line 12
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:
48.03 ms | 626 KiB | 4 Q