3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $raw_input=<<<EOB ([ { success: 1, msg: [ [ { "root": [ { "item": [ { "Content": "今日,沪深两市基本呈强势整理态势,沪指在2350上方反复拉锯,并报收于2357点,涨幅0.43%,量能稳定。盘面上,题材股及煤炭、券商股表现较好力挺大市。创业板方面,题材股反复活跃,创业板指跳空上行,报于1526点,涨幅0.98%。", "date": "20140929", "title": "反复拉锯 2350成多空分水岭", "TotalNum": "59", "group": [ { "data": [ { "CCode": "5111", "ChangeRatio": "0", "ClosePrice": "0.0000", "CName": "石油开采设备", "NetProfit": "0", "NewsID": "324898945", "Pcode": "2038", "PName": "专用设备", "Reason": "定增涉及油改概念 放量上攻", "SecuCode": "000852", "SecuName": "江钻股份", "Mark": [ { "Reason": [ { "id": "5463", "value": "油改" } ] } ] }, { "CCode": "5090", "ChangeRatio": "0", "ClosePrice": "0.0000", "CName": "玻璃", "NetProfit": "0", "NewsID": "479666211", "Pcode": "2032", "PName": "建材", "Reason": "央企改革第二批试点有望启动", "SecuCode": "600552", "SecuName": "方兴科技", "Mark": [ { "Reason": [ { "id": "6451", "value": "国资改革" } ] } ] } ] } ] } ] } ] } ] ] } ]) EOB; $json = preg_replace('/(\w+):/','"$1":', $raw_input); $json = ltrim($json, "\t\n ("); $json = rtrim($json, "\t\n )"); var_dump(json_decode($json));
based on EBVTY
Output for 7.0.0 - 7.1.0
array(1) { [0]=> object(stdClass)#1 (2) { ["success"]=> int(1) ["msg"]=> array(1) { [0]=> array(1) { [0]=> object(stdClass)#11 (1) { ["root"]=> array(1) { [0]=> object(stdClass)#10 (1) { ["item"]=> array(1) { [0]=> object(stdClass)#2 (5) { ["Content"]=> string(304) "今日,沪深两市基本呈强势整理态势,沪指在2350上方反复拉锯,并报收于2357点,涨幅0.43%,量能稳定。盘面上,题材股及煤炭、券商股表现较好力挺大市。创业板方面,题材股反复活跃,创业板指跳空上行,报于1526点,涨幅0.98%。" ["date"]=> string(8) "20140929" ["title"]=> string(35) "反复拉锯 2350成多空分水岭" ["TotalNum"]=> string(2) "59" ["group"]=> array(1) { [0]=> object(stdClass)#9 (1) { ["data"]=> array(2) { [0]=> object(stdClass)#3 (12) { ["CCode"]=> string(4) "5111" ["ChangeRatio"]=> string(1) "0" ["ClosePrice"]=> string(6) "0.0000" ["CName"]=> string(18) "石油开采设备" ["NetProfit"]=> string(1) "0" ["NewsID"]=> string(9) "324898945" ["Pcode"]=> string(4) "2038" ["PName"]=> string(12) "专用设备" ["Reason"]=> string(37) "定增涉及油改概念 放量上攻" ["SecuCode"]=> string(6) "000852" ["SecuName"]=> string(12) "江钻股份" ["Mark"]=> array(1) { [0]=> object(stdClass)#5 (1) { ["Reason"]=> array(1) { [0]=> object(stdClass)#4 (2) { ["id"]=> string(4) "5463" ["value"]=> string(6) "油改" } } } } } [1]=> object(stdClass)#6 (12) { ["CCode"]=> string(4) "5090" ["ChangeRatio"]=> string(1) "0" ["ClosePrice"]=> string(6) "0.0000" ["CName"]=> string(6) "玻璃" ["NetProfit"]=> string(1) "0" ["NewsID"]=> string(9) "479666211" ["Pcode"]=> string(4) "2032" ["PName"]=> string(6) "建材" ["Reason"]=> string(39) "央企改革第二批试点有望启动" ["SecuCode"]=> string(6) "600552" ["SecuName"]=> string(12) "方兴科技" ["Mark"]=> array(1) { [0]=> object(stdClass)#8 (1) { ["Reason"]=> array(1) { [0]=> object(stdClass)#7 (2) { ["id"]=> string(4) "6451" ["value"]=> string(12) "国资改革" } } } } } } } } } } } } } } } } }
Output for 5.2.0 - 5.6.28
array(1) { [0]=> object(stdClass)#1 (2) { ["success"]=> int(1) ["msg"]=> array(1) { [0]=> array(1) { [0]=> object(stdClass)#2 (1) { ["root"]=> array(1) { [0]=> object(stdClass)#3 (1) { ["item"]=> array(1) { [0]=> object(stdClass)#4 (5) { ["Content"]=> string(304) "今日,沪深两市基本呈强势整理态势,沪指在2350上方反复拉锯,并报收于2357点,涨幅0.43%,量能稳定。盘面上,题材股及煤炭、券商股表现较好力挺大市。创业板方面,题材股反复活跃,创业板指跳空上行,报于1526点,涨幅0.98%。" ["date"]=> string(8) "20140929" ["title"]=> string(35) "反复拉锯 2350成多空分水岭" ["TotalNum"]=> string(2) "59" ["group"]=> array(1) { [0]=> object(stdClass)#5 (1) { ["data"]=> array(2) { [0]=> object(stdClass)#6 (12) { ["CCode"]=> string(4) "5111" ["ChangeRatio"]=> string(1) "0" ["ClosePrice"]=> string(6) "0.0000" ["CName"]=> string(18) "石油开采设备" ["NetProfit"]=> string(1) "0" ["NewsID"]=> string(9) "324898945" ["Pcode"]=> string(4) "2038" ["PName"]=> string(12) "专用设备" ["Reason"]=> string(37) "定增涉及油改概念 放量上攻" ["SecuCode"]=> string(6) "000852" ["SecuName"]=> string(12) "江钻股份" ["Mark"]=> array(1) { [0]=> object(stdClass)#7 (1) { ["Reason"]=> array(1) { [0]=> object(stdClass)#8 (2) { ["id"]=> string(4) "5463" ["value"]=> string(6) "油改" } } } } } [1]=> object(stdClass)#9 (12) { ["CCode"]=> string(4) "5090" ["ChangeRatio"]=> string(1) "0" ["ClosePrice"]=> string(6) "0.0000" ["CName"]=> string(6) "玻璃" ["NetProfit"]=> string(1) "0" ["NewsID"]=> string(9) "479666211" ["Pcode"]=> string(4) "2032" ["PName"]=> string(6) "建材" ["Reason"]=> string(39) "央企改革第二批试点有望启动" ["SecuCode"]=> string(6) "600552" ["SecuName"]=> string(12) "方兴科技" ["Mark"]=> array(1) { [0]=> object(stdClass)#10 (1) { ["Reason"]=> array(1) { [0]=> object(stdClass)#11 (2) { ["id"]=> string(4) "6451" ["value"]=> string(12) "国资改革" } } } } } } } } } } } } } } } } }
Output for 5.0.0 - 5.1.1, 5.1.3 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/IdSLU on line 86
Process exited with code 255.
Output for 5.1.2
Fatal error: Call to undefined function json_decode() in /in/IdSLU on line 87
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/IdSLU on line 86
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/IdSLU on line 86
Process exited with code 255.
Output for 4.4.2
Fatal error: Call to undefined function: json_decode() in /in/IdSLU on line 87
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/IdSLU on line 86