A PHP Error was encountered Severity: 8192 Message: Array and string offset access syntax with curly braces is deprecated Filename: libraries/barcode.php Line Number: 1575 code example

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

Let's say you have something like this in your code:

$str = "test";
echo($str{0});

since PHP 7.4 curly braces method to get individual characters inside a string has been deprecated, so change the above syntax into this:

$str = "test";
echo($str[0]);

Tags:

Php Example