3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fooBar($oldVersion) { if ($oldVersion) { return ['foo', 'bar']; } else { return ['bar', 'foo']; } } list($foo, $bar) = fooBar(1); echo "foo is $foo bar is $bar\n"; list($foo, $bar) = fooBar(0); echo "foo is $foo bar is $bar\n";
Output for git.master, git.master_jit, rfc.property-hooks
foo is foo bar is bar foo is bar bar is foo

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:
49.09 ms | 2099 KiB | 4 Q