3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = '{"sections":[{"author_id": 276523011,"body": "<p class=\"p1\">Om dina bilder har hamnat i t.ex. fel ordning, om det saknas text eller liknande ber vi dig kontakta v&aring;r kundservice och beskriva ditt &auml;rende.</p>","comments_disabled": true,"created_at": "2014-03-03T12:06:14Z","draft": false,"html_url": "https://blocket.zendesk.com/hc/sv/articles/201593706-Bilden-eller-texten-%C3%A4r-fel-p%C3%A5-mitt-objekt-hur-%C3%A4ndrar-jag-detta-","id": 201593706,"label_names": [],"locale": "sv","name": "Bilden eller texten \u00e4r fel p\u00e5 mitt objekt, hur \u00e4ndrar jag detta?","outdated": false,"position": 0,"promoted": false,"section_id": 200348616,"source_locale": "sv","title": "Bilden eller texten \u00e4r fel p\u00e5 mitt objekt, hur \u00e4ndrar jag detta?","translation_ids": [202387746],"updated_at": "2014-04-24T14:02:57Z","url": "https://blocket.zendesk.com/hc/api/v2/articles/201593706-Bilden-eller-texten-%C3%A4r-fel-p%C3%A5-mitt-objekt-hur-%C3%A4ndrar-jag-detta-.json","vote_count": 0,"vote_sum": 0}]}'; $json = json_decode($str, true); print_r($json); foreach($json["sections"] as $item) { print_r($item); }
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [sections] => Array ( [0] => Array ( [author_id] => 276523011 [body] => <p class="p1">Om dina bilder har hamnat i t.ex. fel ordning, om det saknas text eller liknande ber vi dig kontakta v&aring;r kundservice och beskriva ditt &auml;rende.</p> [comments_disabled] => 1 [created_at] => 2014-03-03T12:06:14Z [draft] => [html_url] => https://blocket.zendesk.com/hc/sv/articles/201593706-Bilden-eller-texten-%C3%A4r-fel-p%C3%A5-mitt-objekt-hur-%C3%A4ndrar-jag-detta- [id] => 201593706 [label_names] => Array ( ) [locale] => sv [name] => Bilden eller texten är fel på mitt objekt, hur ändrar jag detta? [outdated] => [position] => 0 [promoted] => [section_id] => 200348616 [source_locale] => sv [title] => Bilden eller texten är fel på mitt objekt, hur ändrar jag detta? [translation_ids] => Array ( [0] => 202387746 ) [updated_at] => 2014-04-24T14:02:57Z [url] => https://blocket.zendesk.com/hc/api/v2/articles/201593706-Bilden-eller-texten-%C3%A4r-fel-p%C3%A5-mitt-objekt-hur-%C3%A4ndrar-jag-detta-.json [vote_count] => 0 [vote_sum] => 0 ) ) ) Array ( [author_id] => 276523011 [body] => <p class="p1">Om dina bilder har hamnat i t.ex. fel ordning, om det saknas text eller liknande ber vi dig kontakta v&aring;r kundservice och beskriva ditt &auml;rende.</p> [comments_disabled] => 1 [created_at] => 2014-03-03T12:06:14Z [draft] => [html_url] => https://blocket.zendesk.com/hc/sv/articles/201593706-Bilden-eller-texten-%C3%A4r-fel-p%C3%A5-mitt-objekt-hur-%C3%A4ndrar-jag-detta- [id] => 201593706 [label_names] => Array ( ) [locale] => sv [name] => Bilden eller texten är fel på mitt objekt, hur ändrar jag detta? [outdated] => [position] => 0 [promoted] => [section_id] => 200348616 [source_locale] => sv [title] => Bilden eller texten är fel på mitt objekt, hur ändrar jag detta? [translation_ids] => Array ( [0] => 202387746 ) [updated_at] => 2014-04-24T14:02:57Z [url] => https://blocket.zendesk.com/hc/api/v2/articles/201593706-Bilden-eller-texten-%C3%A4r-fel-p%C3%A5-mitt-objekt-hur-%C3%A4ndrar-jag-detta-.json [vote_count] => 0 [vote_sum] => 0 )
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/K2Pn1 on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/K2Pn1 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/K2Pn1 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/K2Pn1 on line 4