3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($a, $b) { echo "$a $b\n";} foo(...['x', 'y']); // x y // named parameters foo(...['a' => 'x', 'b' => 'y']); // x y foo(...['b' => 'x', 'a' => 'y']); // y x // positional parameters: integer key not used foo(...[0 => 'x', 1 => 'y']); // x y foo(...[120 => 'x', 11 => 'y']); // x y foo(...[11 => 'y', 120 => 'x']); // y x ?>
Output for git.master_jit, git.master
x y x y y x x y x y y x

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:
42.34 ms | 846 KiB | 4 Q