3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "client_id": 1234, "rawdata": [{ "task_id1": { "apikey1": "1234", "flow": "ssp", "total_chocolate_request": 43235, "start_time": "2017 - 05 - 09 12: 29: 00 UTC", "end_time": "2017 - 05 - 09 12: 29: 00 UTC" }, "task_id2": { "apikey2": "1235", "flow": "mobileweb", "total_chocolate_request": 43235, "start_time": "2017 - 05 - 09 12: 29: 00 UTC", "end_time": "2017 - 05 - 09 12: 29: 00 UTC" } }] }'; $array = json_decode($json, true); $rawDatas = $array['rawdata'][0]; foreach($rawDatas as $key =>$data) { echo $key."\n......\n"; var_dump($data); echo "............\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
task_id1 ...... array(5) { ["apikey1"]=> string(4) "1234" ["flow"]=> string(3) "ssp" ["total_chocolate_request"]=> int(43235) ["start_time"]=> string(29) "2017 - 05 - 09 12: 29: 00 UTC" ["end_time"]=> string(29) "2017 - 05 - 09 12: 29: 00 UTC" } ............ task_id2 ...... array(5) { ["apikey2"]=> string(4) "1235" ["flow"]=> string(9) "mobileweb" ["total_chocolate_request"]=> int(43235) ["start_time"]=> string(29) "2017 - 05 - 09 12: 29: 00 UTC" ["end_time"]=> string(29) "2017 - 05 - 09 12: 29: 00 UTC" } ............

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:
31.39 ms | 407 KiB | 5 Q