Closed
Description
On types > string's page, there's a description in Complex (curly) syntax section as follows:
// This is wrong for the same reason as $foo[bar] is wrong outside a string.
// In other words, it will still work, but only because PHP first looks for a
// constant named foo; an error of level E_NOTICE (undefined constant) will be
// thrown.
echo “This is wrong: {$arr[foo][3]}“;
This code doesn't work in PHP 8.
On the Array page, it was corrected in #795.
Similarly, I believe it would be desirable to address this on the String page as well.
- Remove the relevant description from the page entirely.
- Just like the fix on the Array page, add an explanation stating, "As of PHP 8.0.0, it has been removed and throws an Error exception."