3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formData = []; $results['staging_records'][0] = [ 'import_id' => 185, 'customer_id' => 106, 'form_data' =>'[{"0":"2017-11-03 12:40:47","1":327,"2":"BR","3":"106","4":"117399795","5":"A","6":"ANTHONY "}]' ]; $results['staging_records'][1] = [ 'import_id' => 186, 'customer_id' => 107, 'form_data' => '[{"0":"2017-11-03 12:40:47","1":327,"2":"BR","3":"107","4":"117399795","5":"A","6":"WALT "}]' ]; if (count($results['staging_records'])) { $formData = []; foreach($results['staging_records'] as $data) { $formData = array_merge($formData, json_decode($data['form_data'], true)); $import_id = $data['import_id']; } $formJSON = (json_encode($formData)); } // $output = [1,3,5]; var_dump($formData);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(7) { [0]=> string(19) "2017-11-03 12:40:47" [1]=> int(327) [2]=> string(2) "BR" [3]=> string(3) "106" [4]=> string(9) "117399795" [5]=> string(1) "A" [6]=> string(8) "ANTHONY " } [1]=> array(7) { [0]=> string(19) "2017-11-03 12:40:47" [1]=> int(327) [2]=> string(2) "BR" [3]=> string(3) "107" [4]=> string(9) "117399795" [5]=> string(1) "A" [6]=> string(5) "WALT " } }

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:
57.42 ms | 402 KiB | 8 Q