Bug #68467 [Asn->Wfx]: T_DOUBLE_COLON and T_PAAMAYIM_NEKUDOTAYIM used inconsistently
| From: | nikic@php.net | Date: | Tue, 30 Dec 2014 16:37:36 +0000 |
| Subject: | Bug #68467 [Asn->Wfx]: T_DOUBLE_COLON and T_PAAMAYIM_NEKUDOTAYIM used inconsistently | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189531@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68467&edit=1
ID: 68467
Updated by: nikic@php.net
Reported by: fredemmott@php.net
Summary: T_DOUBLE_COLON and T_PAAMAYIM_NEKUDOTAYIM used
inconsistently
-Status: Assigned
+Status: Wont fix
Type: Bug
Package: Scripting Engine problem
PHP Version: 5.6.3
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Past discussions on the topic have shown that the error message is unlikely to be changed. And
there's no point changing the token_name() output to a BC-incompatible, less obvious name just
for the sake of changing it.
Previous Comments:
------------------------------------------------------------------------
[2014-11-20 20:52:17] fredemmott@php.net
s/regardless of content/regardless of context/
------------------------------------------------------------------------
[2014-11-20 20:50:00] fredemmott@php.net
Description:
------------
token_name() reports T_DOUBLE_COLON
Error messages report T_PAAMAYIM_NEKUDOTAYIM
Test script:
---------------
token_name() (http://3v4l.org/RjmUW):
<?php
foreach(token_get_all("<?php echo SplFileObject::SKIP_EMPTY;")[4] as $key=>$val) {
echo token_name($val), PHP_EOL;
}
error message (http://3v4l.org/2T8qQ):
<?php
::
Expected result:
----------------
The name should be consistent for the same token, regardless of content.
Actual result:
--------------
T_DOUBLE_COLON
Warning: token_name() expects parameter 1 to be long, string given in /in/RjmUW on line 4
UNKNOWN
-----
Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting end of file
in /in/2T8qQ on line 3
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68467&edit=1