3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $json = '12345678901234567890'; var_dump(json_decode($json)); var_dump(json_decode($json, false, 512, JSON_BIGINT_AS_STRING)); echo 'BIGINT: "' . JSON_BIGINT_AS_STRING . '"'; ?>
Output for 5.4.11 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
float(1.2345678901235E+19) string(20) "12345678901234567890" BIGINT: "2"
Output for 5.4.0 - 5.4.10
float(1.2345678901235E+19) float(1.2345678901235E+19) BIGINT: "2"
Output for 5.3.0 - 5.3.29
float(1.2345678901235E+19) Warning: json_decode() expects at most 3 parameters, 4 given in /in/e20vQ on line 5 NULL BIGINT: "JSON_BIGINT_AS_STRING"
Output for 5.2.3 - 5.2.17
float(1.2345678901235E+19) Warning: json_decode() expects at most 2 parameters, 4 given in /in/e20vQ on line 5 NULL BIGINT: "JSON_BIGINT_AS_STRING"
Output for 5.2.1 - 5.2.2
float(1.2345678901235E+19) <br /> <b>Warning</b>: json_decode() expects at most 2 parameters, 4 given in <b>/in/e20vQ</b> on line <b>5</b><br /> NULL BIGINT: "JSON_BIGINT_AS_STRING"
Output for 5.2.0
NULL <br /> <b>Warning</b>: json_decode() expects at most 2 parameters, 4 given in <b>/in/e20vQ</b> on line <b>5</b><br /> NULL BIGINT: "JSON_BIGINT_AS_STRING"
Output for 5.0.0 - 5.1.6
<br /> <b>Fatal error</b>: Call to undefined function json_decode() in <b>/in/e20vQ</b> on line <b>4</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: json_decode() in <b>/in/e20vQ</b> on line <b>4</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: json_decode() in <b>/in/e20vQ</b> on line <b>4</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: json_decode() in <b>/in/e20vQ</b> on line <b>4</b><br />