You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The exact type of constant expression is not mentioned but it at least shows the full stack trace.
Yeah, having the correct line number would've been totally sufficient in my case. When I encountered the issue, the search for the cause was complicated by the fact that the incorrect constant expression was the static variable initializer of the parent class of the class I was instantiating with new. If I was pointed to the correct line, then the cause would've been obvious.
@iluuu1994 I've now tested #8855 with this example. It's much better, thanks! Just one minor thing: The reported line is line 4 (which is where the const expression begins), but the constant is in line 5.
I'm not sure if this is fixable. Feel free to close this issue as resolved if it's not worth it.
Description
The following code (https://3v4l.org/la8tX):
Resulted in this output:
But I expected this output instead:
Some indication that the broken constant is in line 5, because line 9 clearly does not contain any constants.
PHP Version
PHP 8.2.1
Operating System
No response
The text was updated successfully, but these errors were encountered: