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

vandan's avatar
Level 13

Array and string offset access syntax with curly braces is deprecated

try to local to ftp report generate then error like

Array and string offset access syntax with curly braces is deprecated

here is my code

$rrhExcelSheet  =  Excel::create($fileName, function($excel) use ($sheetData) {
                        $excel->sheet('sheet1', function($sheet) use ($sheetData)
                        {
                            $sheet->fromArray($sheetData);
                        });
                    })->string('xlsx');
0 likes
1 reply
carltondickson's avatar

Are you using PHP7.4?

What is the name and version of the Excel library you're using?

Sounds like your library code is accessing something in an array or string using curly braces which isn't supported now

$arr = [1, 2, 3];
var_dump($arr{1});

// Deprecated: Array and string offset access syntax with curly braces is deprecated in test.php line 3
int(2)

See here for more info for what has changed

https://wiki.php.net/rfc/deprecate_curly_braces_array_access

I would check your library to see if they have released an update that works for PHP7.4

Please or to participate in this conversation.