3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['a', 'b', 'c']; $b = [ 23 => 'x', 'y', 'z' ]; $c = array_merge($a, $b); $d = $a + $b; print_r(compact('a', 'b', 'c', 'd')); $a = ['a' => 'a', 'b' => 'b', 'c' => 'c']; $b = [ 23 => 'x', 'y', 'z' ]; $c = array_merge($a, $b); $d = $a + $b; print_r(compact('a', 'b', 'c', 'd'));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [a] => Array ( [0] => a [1] => b [2] => c ) [b] => Array ( [23] => x [24] => y [25] => z ) [c] => Array ( [0] => a [1] => b [2] => c [3] => x [4] => y [5] => z ) [d] => Array ( [0] => a [1] => b [2] => c [23] => x [24] => y [25] => z ) ) Array ( [a] => Array ( [a] => a [b] => b [c] => c ) [b] => Array ( [23] => x [24] => y [25] => z ) [c] => Array ( [a] => a [b] => b [c] => c [0] => x [1] => y [2] => z ) [d] => Array ( [a] => a [b] => b [c] => c [23] => x [24] => y [25] => z ) )

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:
27.32 ms | 409 KiB | 5 Q