3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(['0'] + range('A', 'Z'));
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
array(26) { [0]=> string(1) "0" [1]=> string(1) "B" [2]=> string(1) "C" [3]=> string(1) "D" [4]=> string(1) "E" [5]=> string(1) "F" [6]=> string(1) "G" [7]=> string(1) "H" [8]=> string(1) "I" [9]=> string(1) "J" [10]=> string(1) "K" [11]=> string(1) "L" [12]=> string(1) "M" [13]=> string(1) "N" [14]=> string(1) "O" [15]=> string(1) "P" [16]=> string(1) "Q" [17]=> string(1) "R" [18]=> string(1) "S" [19]=> string(1) "T" [20]=> string(1) "U" [21]=> string(1) "V" [22]=> string(1) "W" [23]=> string(1) "X" [24]=> string(1) "Y" [25]=> string(1) "Z" }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/55G3V on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ')' in /in/55G3V on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/55G3V on line 2
Process exited with code 255.

preferences:
244.66 ms | 401 KiB | 423 Q