3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 0=>1 , 1=>'Jon', 2=>'jon@email.com' , 3=>2 , 4=>'Doe' , 5=>'doe@email.com' , 6=>3, 7=>'Foo' , 8=>'foo@email.com', ]; $array=array_map(function($val){ return array_combine(['id','name','email'],$val);}, array_chunk($array,3)); var_dump($array);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(3) { ["id"]=> int(1) ["name"]=> string(3) "Jon" ["email"]=> string(13) "jon@email.com" } [1]=> array(3) { ["id"]=> int(2) ["name"]=> string(3) "Doe" ["email"]=> string(13) "doe@email.com" } [2]=> array(3) { ["id"]=> int(3) ["name"]=> string(3) "Foo" ["email"]=> string(13) "foo@email.com" } }

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