3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = json_decode('{"id":[{"id":"217448625"},{"id":"177484962"},{"id":"575507011"},{"id":"162589600"},{"id":"339801850"},{"id":"806588415"},{"id":"442404184"},{"id":"107993689"},{"id":"963131998"},{"id":"269129468"},{"id":"494129526"},{"id":"553974030"},{"id":"303605191"},{"id":"853989127"},{"id":"945445395"},{"id":"686319771"},{"id":"452720413"},{"id":"408738294"},{"id":"779785890"},{"id":"410265355"},{"id":"145122043"},{"id":"416384934"},{"id":"225309994"},{"id":"119097350"},{"id":"809603737"},{"id":"972206998"},{"id":"716565761"},{"id":"888480463"},{"id":"167246698"},{"id":"301779380"},{"id":"275131784"},{"id":"535592781"},{"id":"218912891"},{"id":"237209480"},{"id":"222869467"},{"id":"565314495"},{"id":"663027610"},{"id":"673312952"},{"id":"433707402"},{"id":"392469480"},{"id":"979126646"},{"id":"596659167"},{"id":"364134907"},{"id":"444947354"},{"id":"392469290"},{"id":"156935583"},{"id":"422651149"},{"id":"324941805"},{"id":"631141962"},{"id":"965810882"},{"id":"492888252"},{"id":"519126348"},{"id":"311331032"},{"id":"685640149"},{"id":"520158393"},{"id":"190111174"},{"id":"908536851"},{"id":"108845437"},{"id":"505550892"},{"id":"329031075"},{"id":"387606271"},{"id":"416439406"},{"id":"946531336"},{"id":"452506100"},{"id":"531041184"},{"id":"481824696"},{"id":"897766676"},{"id":"245420403"},{"id":"653718418"},{"id":"216170274"},{"id":"856269875"},{"id":"356299494"},{"id":"463822301"},{"id":"201771935"},{"id":"436743372"},{"id":"269580489"},{"id":"397228451"},{"id":"700527377"},{"id":"909432670"},{"id":"740551258"},{"id":"350466570"},{"id":"518130052"},{"id":"482774349"},{"id":"765180592"},{"id":"352824389"},{"id":"849755605"},{"id":"486353321"},{"id":"337953447"},{"id":"528738409"},{"id":"512344430"},{"id":"877081816"},{"id":"789112632"},{"id":"940200119"},{"id":"587403439"},{"id":"172924918"},{"id":"430937296"},{"id":"235732186"},{"id":"183279375"},{"id":"283625369"},{"id":"752366016"}]}'); //print_r($array); $i=0; foreach ($array as $key => $element) foreach ($element as $element2) print_r($element2); //var_export($newArray);
based on LYjIV
Output for 5.3.19 - 7.2.0
stdClass Object ( [id] => 217448625 ) stdClass Object ( [id] => 177484962 ) stdClass Object ( [id] => 575507011 ) stdClass Object ( [id] => 162589600 ) stdClass Object ( [id] => 339801850 ) stdClass Object ( [id] => 806588415 ) stdClass Object ( [id] => 442404184 ) stdClass Object ( [id] => 107993689 ) stdClass Object ( [id] => 963131998 ) stdClass Object ( [id] => 269129468 ) stdClass Object ( [id] => 494129526 ) stdClass Object ( [id] => 553974030 ) stdClass Object ( [id] => 303605191 ) stdClass Object ( [id] => 853989127 ) stdClass Object ( [id] => 945445395 ) stdClass Object ( [id] => 686319771 ) stdClass Object ( [id] => 452720413 ) stdClass Object ( [id] => 408738294 ) stdClass Object ( [id] => 779785890 ) stdClass Object ( [id] => 410265355 ) stdClass Object ( [id] => 145122043 ) stdClass Object ( [id] => 416384934 ) stdClass Object ( [id] => 225309994 ) stdClass Object ( [id] => 119097350 ) stdClass Object ( [id] => 809603737 ) stdClass Object ( [id] => 972206998 ) stdClass Object ( [id] => 716565761 ) stdClass Object ( [id] => 888480463 ) stdClass Object ( [id] => 167246698 ) stdClass Object ( [id] => 301779380 ) stdClass Object ( [id] => 275131784 ) stdClass Object ( [id] => 535592781 ) stdClass Object ( [id] => 218912891 ) stdClass Object ( [id] => 237209480 ) stdClass Object ( [id] => 222869467 ) stdClass Object ( [id] => 565314495 ) stdClass Object ( [id] => 663027610 ) stdClass Object ( [id] => 673312952 ) stdClass Object ( [id] => 433707402 ) stdClass Object ( [id] => 392469480 ) stdClass Object ( [id] => 979126646 ) stdClass Object ( [id] => 596659167 ) stdClass Object ( [id] => 364134907 ) stdClass Object ( [id] => 444947354 ) stdClass Object ( [id] => 392469290 ) stdClass Object ( [id] => 156935583 ) stdClass Object ( [id] => 422651149 ) stdClass Object ( [id] => 324941805 ) stdClass Object ( [id] => 631141962 ) stdClass Object ( [id] => 965810882 ) stdClass Object ( [id] => 492888252 ) stdClass Object ( [id] => 519126348 ) stdClass Object ( [id] => 311331032 ) stdClass Object ( [id] => 685640149 ) stdClass Object ( [id] => 520158393 ) stdClass Object ( [id] => 190111174 ) stdClass Object ( [id] => 908536851 ) stdClass Object ( [id] => 108845437 ) stdClass Object ( [id] => 505550892 ) stdClass Object ( [id] => 329031075 ) stdClass Object ( [id] => 387606271 ) stdClass Object ( [id] => 416439406 ) stdClass Object ( [id] => 946531336 ) stdClass Object ( [id] => 452506100 ) stdClass Object ( [id] => 531041184 ) stdClass Object ( [id] => 481824696 ) stdClass Object ( [id] => 897766676 ) stdClass Object ( [id] => 245420403 ) stdClass Object ( [id] => 653718418 ) stdClass Object ( [id] => 216170274 ) stdClass Object ( [id] => 856269875 ) stdClass Object ( [id] => 356299494 ) stdClass Object ( [id] => 463822301 ) stdClass Object ( [id] => 201771935 ) stdClass Object ( [id] => 436743372 ) stdClass Object ( [id] => 269580489 ) stdClass Object ( [id] => 397228451 ) stdClass Object ( [id] => 700527377 ) stdClass Object ( [id] => 909432670 ) stdClass Object ( [id] => 740551258 ) stdClass Object ( [id] => 350466570 ) stdClass Object ( [id] => 518130052 ) stdClass Object ( [id] => 482774349 ) stdClass Object ( [id] => 765180592 ) stdClass Object ( [id] => 352824389 ) stdClass Object ( [id] => 849755605 ) stdClass Object ( [id] => 486353321 ) stdClass Object ( [id] => 337953447 ) stdClass Object ( [id] => 528738409 ) stdClass Object ( [id] => 512344430 ) stdClass Object ( [id] => 877081816 ) stdClass Object ( [id] => 789112632 ) stdClass Object ( [id] => 940200119 ) stdClass Object ( [id] => 587403439 ) stdClass Object ( [id] => 172924918 ) stdClass Object ( [id] => 430937296 ) stdClass Object ( [id] => 235732186 ) stdClass Object ( [id] => 183279375 ) stdClass Object ( [id] => 283625369 ) stdClass Object ( [id] => 752366016 )