3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ 310 => 0, 311 => 0, 312 => 0, 313 => 0, 314 => 0, 315 => 0 ]; $array2 = [ "2019-05-17" => [ 312 => 3000.00 ], "2019-06-20" => [ 312 => 3000.00 ], "2019-06-27" => [ 313 => 5000.00, 315 => 3000.00 ] ]; var_export( array_map( function($row) use ($array1) { return array_replace($array1, $row); }, $array2 ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( '2019-05-17' => array ( 310 => 0, 311 => 0, 312 => 3000.0, 313 => 0, 314 => 0, 315 => 0, ), '2019-06-20' => array ( 310 => 0, 311 => 0, 312 => 3000.0, 313 => 0, 314 => 0, 315 => 0, ), '2019-06-27' => array ( 310 => 0, 311 => 0, 312 => 0, 313 => 5000.0, 314 => 0, 315 => 3000.0, ), )

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:
183.1 ms | 406 KiB | 5 Q