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['id'] as $key => $element) print_r($element); //var_export($newArray);
based on svgBb
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/0Z03B:7 Stack trace: #0 {main} thrown in /in/0Z03B on line 7
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Cannot use object of type stdClass as array in /in/0Z03B on line 7
Process exited with code 255.