3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = ["1st Desc","2nd Desc","3rd Desc"]; $arr2 =["100.10","10.50","39.99"]; $expected = []; foreach($arr1 as $k=>$v){ $expected[$k] = ['description'=>$v,'amount'=>$arr2[$k]]; } echo json_encode($expected,JSON_PRETTY_PRINT); ?>
Output for git.master, git.master_jit, rfc.property-hooks
[ { "description": "1st Desc", "amount": "100.10" }, { "description": "2nd Desc", "amount": "10.50" }, { "description": "3rd Desc", "amount": "39.99" } ]

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