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));
Output for 5.4.0 - 5.4.32
Parse error: syntax error, unexpected end of file in /in/EBVTY on line 86
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected $end in /in/EBVTY on line 86
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected $ in /in/EBVTY on line 86
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/EBVTY on line 86
Process exited with code 255.