3v4l.org

run code in 300+ PHP versions simultaneously
<?php $return = 'json'; echo json_encode(array("return" => $return, "success" => true));
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.7, 5.5.9, 5.5.11 - 5.5.15, 5.5.17, 5.5.19, 5.5.23 - 5.5.24, 5.5.26 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.12, 7.2.14 - 7.2.26, 7.3.0 - 7.3.4, 7.3.6 - 7.3.13, 7.4.0 - 7.4.1, 8.2.16 - 8.2.17, 8.3.3 - 8.3.4
{"return":"json","success":true}
Output for 5.5.8, 5.5.10, 5.5.16, 5.5.18, 5.5.20 - 5.5.22, 5.5.25, 7.2.13, 7.3.5

Process exited with code 137.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Call to undefined function json_encode() in /in/eI87R on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_encode() in /in/eI87R on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: json_encode() in /in/eI87R on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_encode() in /in/eI87R on line 4

preferences:
207.7 ms | 401 KiB | 329 Q