3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = '{"adtNum":1,"blockPrice":0,"cabinNames":{"business":"公务舱","economy":"经济舱","first":"头等舱","lowest":"最低价","more":"更多优惠"}}'; var_dump(json_decode($str,JSON_UNESCAPED_UNICODE));
Output for 5.4.0 - 7.1.0
array(3) { ["adtNum"]=> int(1) ["blockPrice"]=> int(0) ["cabinNames"]=> array(5) { ["business"]=> string(9) "公务舱" ["economy"]=> string(9) "经济舱" ["first"]=> string(9) "头等舱" ["lowest"]=> string(9) "最低价" ["more"]=> string(12) "更多优惠" } }
Output for 5.2.0 - 5.3.29
Notice: Use of undefined constant JSON_UNESCAPED_UNICODE - assumed 'JSON_UNESCAPED_UNICODE' in /in/1RfgU on line 3 array(3) { ["adtNum"]=> int(1) ["blockPrice"]=> int(0) ["cabinNames"]=> array(5) { ["business"]=> string(9) "公务舱" ["economy"]=> string(9) "经济舱" ["first"]=> string(9) "头等舱" ["lowest"]=> string(9) "最低价" ["more"]=> string(12) "更多优惠" } }
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/1RfgU on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/1RfgU on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/1RfgU on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/1RfgU on line 3