Req #76721 [Fbk->Csd]: T_PAAMAYIM_NEKUDOTAYIM

From: Date: Fri, 05 Oct 2018 14:25:56 +0000
Subject: Req #76721 [Fbk->Csd]: T_PAAMAYIM_NEKUDOTAYIM
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217436@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76721&edit=1 ID: 76721 Updated by: cmb@php.net Reported by: s dot rotondo90 at gmail dot com Summary: T_PAAMAYIM_NEKUDOTAYIM -Status: Feedback +Status: Closed Type: Feature/Change Request Package: *General Issues Operating System: Any PHP Version: 7.1.20 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Well, then closing. Previous Comments: ------------------------------------------------------------------------ [2018-08-08 11:24:20] s dot rotondo90 at gmail dot com 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. ------------------------------------------------------------------------ [2018-08-08 10:40:29] nikic@php.net 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? ------------------------------------------------------------------------ [2018-08-08 10:32:42] s dot rotondo90 at gmail dot com 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). ------------------------------------------------------------------------ [2018-08-08 10:05:13] spam2 at rhsoft dot net while i am not a php-developer: that was discussed and reported a million times and won't happen ------------------------------------------------------------------------ [2018-08-08 10:01:03] s dot rotondo90 at gmail dot com Description: ------------ 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. Test script: --------------- <?php ::testCase(); Expected result: ---------------- Parse error: syntax error, unexpected '::' (T_SCOPE_OPERATOR), expecting end of file in [...][...] on line 3 Actual result: -------------- Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting end of file in [...][...] on line 3 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76721&edit=1

« previous php.bugs (#217436) next »