3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'a'=>'123', 'b'=>123, ); $json = json_encode(a); echo $json
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/4q4OH on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected $end, expecting ',' or ';' in /in/4q4OH on line 7
Process exited with code 255.

preferences:
182.78 ms | 1395 KiB | 52 Q