3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $json = '[ { "Date":"2014-12-29", "totalCount":"1" }, { "Date":"2015-02-05", "totalCount":"116" }, { "Date":"2015-02-06", "totalCount":"7" }, { "Date":"2015-02-07", "totalCount":"5" }, { "Date":"2015-02-08", "totalCount":"16" }, { "Date":"2015-02-09", "totalCount":"39" }, { "Date":"2015-02-10", "totalCount":"29" }, { "Date":"2015-02-11", "totalCount":"7" }, { "Date":"2015-02-12", "totalCount":"14" }, { "Date":"2015-02-13", "totalCount":"16" }, { "Date":"2015-02-14", "totalCount":"12" }, { "Date":"2015-02-15", "totalCount":"7" }, { "Date":"2015-02-16", "totalCount":"1" }, { "Date":"2015-02-17", "totalCount":"8" }, { "Date":"2015-02-18", "totalCount":"25" }, { "Date":"2015-02-19", "totalCount":"17" }, { "Date":"2015-02-20", "totalCount":"15" }, { "Date":"2015-02-21", "totalCount":"10" }, { "Date":"2015-02-22", "totalCount":"7" }, { "Date":"2015-02-23", "totalCount":"8" }, { "Date":"2015-02-24", "totalCount":"17" }, { "Date":"2015-02-25", "totalCount":"3" }, { "Date":"2015-02-26", "totalCount":"3" }, { "Date":"2015-02-27", "totalCount":"2" }, { "Date":"2015-02-28", "totalCount":"1" }, { "Date":"2015-03-01", "totalCount":"3" }, { "Date":"2015-03-02", "totalCount":"10" }, { "Date":"2015-03-03", "totalCount":"1" }, { "Date":"2015-03-04", "totalCount":"9" }, { "Date":"2015-03-05", "totalCount":"3" }, { "Date":"2015-03-06", "totalCount":"13" }, { "Date":"2015-03-07", "totalCount":"5" }, { "Date":"2015-03-08", "totalCount":"7" }, { "Date":"2015-03-09", "totalCount":"6" }, { "Date":"2015-03-10", "totalCount":"11" }, { "Date":"2015-03-11", "totalCount":"3" }, { "Date":"2015-03-12", "totalCount":"8" }, { "Date":"2015-03-13", "totalCount":"5" }, { "Date":"2015-03-14", "totalCount":"10" }, { "Date":"2015-03-15", "totalCount":"5" }, { "Date":"2015-03-16", "totalCount":"5" }, { "Date":"2015-03-17", "totalCount":"7" }, { "Date":"2015-03-18", "totalCount":"4" }, { "Date":"2015-03-19", "totalCount":"4" }, { "Date":"2015-03-20", "totalCount":"6" }, { "Date":"2015-03-21", "totalCount":"6" }, { "Date":"2015-03-22", "totalCount":"2" }, { "Date":"2015-03-23", "totalCount":"3" }, { "Date":"2015-03-24", "totalCount":"7" }, { "Date":"2015-03-25", "totalCount":"5" }, { "Date":"2015-03-26", "totalCount":"2" }, { "Date":"2015-03-27", "totalCount":"2" }, { "Date":"2015-03-28", "totalCount":"4" }, { "Date":"2015-03-29", "totalCount":"3" }, { "Date":"2015-03-30", "totalCount":"3" }, { "Date":"2015-03-31", "totalCount":"1" }, { "Date":"2015-04-01", "totalCount":"3" }, { "Date":"2015-04-02", "totalCount":"5" }, { "Date":"2015-04-03", "totalCount":"5" }, { "Date":"2015-04-04", "totalCount":"3" }, { "Date":"2015-04-05", "totalCount":"4" }, { "Date":"2015-04-06", "totalCount":"2" }, { "Date":"2015-04-07", "totalCount":"4" }, { "Date":"2015-04-08", "totalCount":"7" }, { "Date":"2015-04-09", "totalCount":"5" }, { "Date":"2015-04-10", "totalCount":"3" }, { "Date":"2015-04-11", "totalCount":"7" }, { "Date":"2015-04-12", "totalCount":"5" }, { "Date":"2015-04-13", "totalCount":"12" }, { "Date":"2015-04-14", "totalCount":"5" }, { "Date":"2015-04-15", "totalCount":"7" }, { "Date":"2015-04-16", "totalCount":"5" }, { "Date":"2015-04-17", "totalCount":"6" }, { "Date":"2015-04-18", "totalCount":"6" }, { "Date":"2015-04-19", "totalCount":"14" }, { "Date":"2015-04-20", "totalCount":"10" }, { "Date":"2015-04-21", "totalCount":"10" }, { "Date":"2015-04-22", "totalCount":"4" }, { "Date":"2015-04-23", "totalCount":"7" }, { "Date":"2015-04-24", "totalCount":"8" } ]'; $obj = json_encode($json); var_dump($obj);
Output for 5.2.0 - 7.2.0
string(5866) ""[\n {\n \"Date\":\"2014-12-29\",\n \"totalCount\":\"1\"\n },\n {\n \"Date\":\"2015-02-05\",\n \"totalCount\":\"116\"\n },\n {\n \"Date\":\"2015-02-06\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-02-07\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-02-08\",\n \"totalCount\":\"16\"\n },\n {\n \"Date\":\"2015-02-09\",\n \"totalCount\":\"39\"\n },\n {\n \"Date\":\"2015-02-10\",\n \"totalCount\":\"29\"\n },\n {\n \"Date\":\"2015-02-11\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-02-12\",\n \"totalCount\":\"14\"\n },\n {\n \"Date\":\"2015-02-13\",\n \"totalCount\":\"16\"\n },\n {\n \"Date\":\"2015-02-14\",\n \"totalCount\":\"12\"\n },\n {\n \"Date\":\"2015-02-15\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-02-16\",\n \"totalCount\":\"1\"\n },\n {\n \"Date\":\"2015-02-17\",\n \"totalCount\":\"8\"\n },\n {\n \"Date\":\"2015-02-18\",\n \"totalCount\":\"25\"\n },\n {\n \"Date\":\"2015-02-19\",\n \"totalCount\":\"17\"\n },\n {\n \"Date\":\"2015-02-20\",\n \"totalCount\":\"15\"\n },\n {\n \"Date\":\"2015-02-21\",\n \"totalCount\":\"10\"\n },\n {\n \"Date\":\"2015-02-22\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-02-23\",\n \"totalCount\":\"8\"\n },\n {\n \"Date\":\"2015-02-24\",\n \"totalCount\":\"17\"\n },\n {\n \"Date\":\"2015-02-25\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-02-26\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-02-27\",\n \"totalCount\":\"2\"\n },\n {\n \"Date\":\"2015-02-28\",\n \"totalCount\":\"1\"\n },\n {\n \"Date\":\"2015-03-01\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-03-02\",\n \"totalCount\":\"10\"\n },\n {\n \"Date\":\"2015-03-03\",\n \"totalCount\":\"1\"\n },\n {\n \"Date\":\"2015-03-04\",\n \"totalCount\":\"9\"\n },\n {\n \"Date\":\"2015-03-05\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-03-06\",\n \"totalCount\":\"13\"\n },\n {\n \"Date\":\"2015-03-07\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-03-08\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-03-09\",\n \"totalCount\":\"6\"\n },\n {\n \"Date\":\"2015-03-10\",\n \"totalCount\":\"11\"\n },\n {\n \"Date\":\"2015-03-11\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-03-12\",\n \"totalCount\":\"8\"\n },\n {\n \"Date\":\"2015-03-13\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-03-14\",\n \"totalCount\":\"10\"\n },\n {\n \"Date\":\"2015-03-15\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-03-16\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-03-17\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-03-18\",\n \"totalCount\":\"4\"\n },\n {\n \"Date\":\"2015-03-19\",\n \"totalCount\":\"4\"\n },\n {\n \"Date\":\"2015-03-20\",\n \"totalCount\":\"6\"\n },\n {\n \"Date\":\"2015-03-21\",\n \"totalCount\":\"6\"\n },\n {\n \"Date\":\"2015-03-22\",\n \"totalCount\":\"2\"\n },\n {\n \"Date\":\"2015-03-23\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-03-24\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-03-25\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-03-26\",\n \"totalCount\":\"2\"\n },\n {\n \"Date\":\"2015-03-27\",\n \"totalCount\":\"2\"\n },\n {\n \"Date\":\"2015-03-28\",\n \"totalCount\":\"4\"\n },\n {\n \"Date\":\"2015-03-29\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-03-30\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-03-31\",\n \"totalCount\":\"1\"\n },\n {\n \"Date\":\"2015-04-01\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-04-02\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-04-03\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-04-04\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-04-05\",\n \"totalCount\":\"4\"\n },\n {\n \"Date\":\"2015-04-06\",\n \"totalCount\":\"2\"\n },\n {\n \"Date\":\"2015-04-07\",\n \"totalCount\":\"4\"\n },\n {\n \"Date\":\"2015-04-08\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-04-09\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-04-10\",\n \"totalCount\":\"3\"\n },\n {\n \"Date\":\"2015-04-11\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-04-12\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-04-13\",\n \"totalCount\":\"12\"\n },\n {\n \"Date\":\"2015-04-14\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-04-15\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-04-16\",\n \"totalCount\":\"5\"\n },\n {\n \"Date\":\"2015-04-17\",\n \"totalCount\":\"6\"\n },\n {\n \"Date\":\"2015-04-18\",\n \"totalCount\":\"6\"\n },\n {\n \"Date\":\"2015-04-19\",\n \"totalCount\":\"14\"\n },\n {\n \"Date\":\"2015-04-20\",\n \"totalCount\":\"10\"\n },\n {\n \"Date\":\"2015-04-21\",\n \"totalCount\":\"10\"\n },\n {\n \"Date\":\"2015-04-22\",\n \"totalCount\":\"4\"\n },\n {\n \"Date\":\"2015-04-23\",\n \"totalCount\":\"7\"\n },\n {\n \"Date\":\"2015-04-24\",\n \"totalCount\":\"8\"\n }\n]""
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_encode() in /in/krtp6 on line 326
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_encode() in /in/krtp6 on line 326
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_encode() in /in/krtp6 on line 326
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_encode() in /in/krtp6 on line 326