3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5); if(isset(JSON_PRETTY_PRINT) && defined(JSON_PRETTY_PRINT)){ echo json_encode($arr, JSON_PRETTY_PRINT); echo JSON_PRETTY_PRINT; } ?>
Output for 5.4.18 - 5.4.29
Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/K1L9P on line 4
Process exited with code 255.
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/1b6LG on line 4
Process exited with code 255.
Output for 5.3.25, 5.3.27 - 5.3.28
Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in /in/K1L9P on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.24, 5.3.26
Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in /in/1b6LG on line 4
Process exited with code 255.

preferences:
195.51 ms | 1395 KiB | 66 Q