3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a1 = [ "a" => 2, "b" => 0, "c" => 5, ]; $a2 = [ "a" => 3, "b" => 9, "c" => 7, "d" => 10, ]; $a3 = [ 'b' => 5, 'e' => 10, ]; var_export( array_map( fn($v) => array_sum((array) $v), array_merge_recursive($a1, $a2, $a3) ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'a' => 5, 'b' => 14, 'c' => 12, 'd' => 10, 'e' => 10, )

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:
41.14 ms | 996 KiB | 4 Q