3v4l.org

run code in 200+ PHP versions simultaneously
<?php $arr = [derp]; echo "$arr[ 0 ]";
Output for 7.1.0 - 7.4.4
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /in/Vph24 on line 4
Process exited with code 255.
Output for 5.6.0 - 7.0.33
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /in/Vph24 on line 4
Process exited with code 255.