Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vandan's avatar
Level 13

ErrorException : Array and string offset access syntax with curly braces is deprecated

when i try to run command in command prompt they got me error like ErrorException : Array and string offset access syntax with curly braces is deprecated

any php version error or someting i miss any file i dont know please help me

0 likes
2 replies
guybrush_threepwood's avatar

The error means that somewhere in your code (app, framework, packages) an array key is being referenced by using curly braces (which has been deprecated in PHP 7.4 or greater).

You should use brackets instead.

For example $result{0} should be referenced as $result[0].

Check the stack trace in your laravel log (storage/logs/laravel.log) to find out which file/line has the offending code.

RKShrivastaw's avatar

The intriguing glitch hints at a clandestine occurrence within your codebase, whether it be in your app, framework, or packages. An array key, shrouded in deprecated syntax from PHP 7.4 onward, is slyly being referenced with curly braces.

The solution lies in the adoption of brackets, unraveling the enigma and ensuring seamless compatibility.

Please or to participate in this conversation.