syntax error, unexpected ‘{’¶
Description¶
This error arise when the old curly braces syntax is used to access an element in an array. This syntax was deprecated in PHP 7.x and removed entirely in 8.0. It also was left as a syntax error since PHP 8.3.
Example¶
<?php
$array[1]{0};
?>
Solutions¶
Use the square brackets to access array elements.
Changed Behavior¶
This error may appear following an evolution in behavior, in previous versions. See ` <https://php-changed-behaviors.readthedocs.io/en/latest/behavior/.html>`_.