3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = '[{"EXTAPP_ID":"9901","CATEGORY_ID":"10","LANGUAGE_CODE":"tr","CATEGORY_LANG_DESC":"Sat\u0131\u015f Departman\u0131"},{"EXTAPP_ID":"9901","CATEGORY_ID":"10","LANGUAGE_CODE":"de","CATEGORY_LANG_DESC":"Sales Abteilung"},{"EXTAPP_ID":"9901","CATEGORY_ID":"20","LANGUAGE_CODE":"de","CATEGORY_LANG_DESC":"Procurement Abteilung"},{"EXTAPP_ID":"9901","CATEGORY_ID":"20","LANGUAGE_CODE":"tr","CATEGORY_LANG_DESC":"Sat\u0131nalma Departman\u0131"},{"EXTAPP_ID":"9901","CATEGORY_ID":"10","LANGUAGE_CODE":"en","CATEGORY_LANG_DESC":"Sales Department"},{"EXTAPP_ID":"9901","CATEGORY_ID":"20","LANGUAGE_CODE":"en","CATEGORY_LANG_DESC":"Procurement Department"}]'; $json = json_decode($string, true); foreach($json AS $array) { foreach($array AS $key => $value) { echo $key . " : " . $value; } }
Output for 5.2.9 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
EXTAPP_ID : 9901CATEGORY_ID : 10LANGUAGE_CODE : trCATEGORY_LANG_DESC : Satış DepartmanıEXTAPP_ID : 9901CATEGORY_ID : 10LANGUAGE_CODE : deCATEGORY_LANG_DESC : Sales AbteilungEXTAPP_ID : 9901CATEGORY_ID : 20LANGUAGE_CODE : deCATEGORY_LANG_DESC : Procurement AbteilungEXTAPP_ID : 9901CATEGORY_ID : 20LANGUAGE_CODE : trCATEGORY_LANG_DESC : Satınalma DepartmanıEXTAPP_ID : 9901CATEGORY_ID : 10LANGUAGE_CODE : enCATEGORY_LANG_DESC : Sales DepartmentEXTAPP_ID : 9901CATEGORY_ID : 20LANGUAGE_CODE : enCATEGORY_LANG_DESC : Procurement Department
Output for 5.0.0 - 5.1.5
Fatal error: Call to undefined function json_decode() in /in/uDOQ0 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/uDOQ0 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/uDOQ0 on line 4