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[] = [ 'data' => json_decode($data['form_data'], true), 'import_id' => $data['import_id'] ]; } $formJSON = (json_encode($formData)); } var_dump($formData);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(2) { ["data"]=> array(1) { [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 " } } ["import_id"]=> int(185) } [1]=> array(2) { ["data"]=> array(1) { [0]=> 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 " } } ["import_id"]=> int(186) } }

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:
30.62 ms | 403 KiB | 8 Q