Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined constant fallback deprecated; mentioned as E_NOTICE (in language.types.string) #2779

Open
o0h opened this issue Sep 21, 2023 · 1 comment

Comments

@o0h
Copy link
Contributor

o0h commented Sep 21, 2023

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.
echoThis 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."
@Girgias
Copy link
Member

Girgias commented Sep 22, 2023

Related to #2000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants