3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name = [ 'first' => 'Foo', 'last' => 'Bar', ]; echo "Hello $name['first']";
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.24, 8.2.0 - 8.2.11
Parse error: syntax error, unexpected string content "", expecting "-" or identifier or variable or number in /in/nk9So on line 8
Process exited with code 255.

preferences:
188.94 ms | 1410 KiB | 73 Q