3v4l.org

run code in 500+ PHP versions simultaneously
<?php $rows = [ ['first_name' => 'Hi'] ]; foreach ($rows as $row) { echo "value=$row['first_name']"; }
Output for 8.3.5
Parse error: syntax error, unexpected string content "", expecting "-" or identifier or variable or number in /in/K6fUd on line 8
Process exited with code 255.
Output for 7.1.0 - 7.1.17, 7.2.0 - 7.2.7
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/K6fUd on line 8
Process exited with code 255.

preferences:
45.57 ms | 600 KiB | 3 Q