3v4l.org

run code in 300+ PHP versions simultaneously
<?php $valores = [ ["1","1","1","1"], ["2","2","2","2"] ];//array of values $keys = ['k1','k2','k3','k4']; //array of keys $id = ['SpecialKey' => 'SpecialValue'];//new array of items I want to add var_export( array_map( fn($row) => array_combine($keys, $row) + $id, $valores ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'k1' => '1', 'k2' => '1', 'k3' => '1', 'k4' => '1', 'SpecialKey' => 'SpecialValue', ), 1 => array ( 'k1' => '2', 'k2' => '2', 'k3' => '2', 'k4' => '2', 'SpecialKey' => 'SpecialValue', ), )

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