php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #76721 T_PAAMAYIM_NEKUDOTAYIM
Submitted: 2018-08-08 10:01 UTC Modified: 2018-10-05 14:25 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: s dot rotondo90 at gmail dot com Assigned: cmb (profile)
Status: Closed Package: *General Issues
PHP Version: 7.1.20 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: s dot rotondo90 at gmail dot com
New email:
PHP Version: OS:

 

 [2018-08-08 10:01 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-08 10:05 UTC] 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:32 UTC] 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:40 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2018-08-08 10:40 UTC] 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 11:24 UTC] 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-10-05 14:25 UTC] cmb@php.net
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-10-05 14:25 UTC] cmb@php.net
Well, then closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 20:01:32 2024 UTC