3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [ "Jan 01, 2013" => ["COM" => 100, "RES" => 200, "FOO" => 5], "Oct 28, 2014" => ["COM" => 300, "RES" => 400] ]; $arr2 = [ "Jan 01, 2013" => ["COM" => 10, "RES" => 20], "Oct 28, 2014" => ["COM" => 30, "RES" => 40] ]; var_export( array_map( fn($set) => array_map( fn($v) => array_sum((array) $v), $set ), array_merge_recursive($arr1, $arr2) ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'Jan 01, 2013' => array ( 'COM' => 110, 'RES' => 220, 'FOO' => 5, ), 'Oct 28, 2014' => array ( 'COM' => 330, 'RES' => 440, ), )

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:
115.18 ms | 405 KiB | 5 Q