go to bug id or search bugs for
In some error cases PHP returns the error "Unexpected T_PAAMAYIM_NEKUDOTAYIM" which is in hebrew language rather than english. This is confusing and causes a lot of time wasting for those who are new to this error.
It would be more consistent to use an english descriptor such as "Unexpected T_SCOPE_OPERATOR" or something similiar that instantly lets you to exactly know where the problem is without having to google it.
Parse error: syntax error, unexpected '::' (T_SCOPE_OPERATOR), expecting end of file in [...][...] on line 3
Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting end of file in [...][...] on line 3
Add a Patch
Add a Pull Request
while i am not a php-developer: that was discussed and reported a million times and won't happen
It's because it was discussed million of times that this should be considered. That means that a large number of developers finds it to be highly misleading and the php core team should at least have to ask why reports like this continue to appears after something like sixteen years from the first one i was able to find.
I'm asking this feature change to point it out about an annoying fact that all of the developers out there knows well. Small changes like this will improve the language readability, nobody asked it for just the sake of changing it (as i read in a report before).
I believe part of the reason why error messages now include the symbol ('::' in your case) is to clarify the meaning of the error while preserving this nod to history.
Can you please clarify in which way '::' is confusing or ambiguous?
The double colon symbol itself is not confusing.
I remember that there was a case in which you received the T_PAAMAYIM_NEKUDOTAYIM without any other indication and i was start thinking that my test script was maybe not the right case to show it. I was thinking wrong apparently, if that case is simply not existing anymore and the T_PAAMAYIM... error is just a nod that may disappear in the future this message is not misleading as it was some time ago.
I really apologize and thank you for you response.
Well, then closing.