Bug #68467 [NEW]: T_DOUBLE_COLON and T_PAAMAYIM_NEKUDOTAYIM used inconsistently

From: Date: Thu, 20 Nov 2014 20:50:00 +0000
Subject: Bug #68467 [NEW]: T_DOUBLE_COLON and T_PAAMAYIM_NEKUDOTAYIM used inconsistently
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188720@lists.php.net to get a copy of this message
From: fredemmott Operating system: PHP version: 5.6.3 Package: Scripting Engine problem Bug Type: Bug Bug description:T_DOUBLE_COLON and T_PAAMAYIM_NEKUDOTAYIM used inconsistently 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 bug report at https://bugs.php.net/bug.php?id=68467&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68467&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68467&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68467&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68467&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68467&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68467&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68467&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68467&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68467&r=support Expected behavior: https://bugs.php.net/fix.php?id=68467&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68467&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68467&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68467&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68467&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68467&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68467&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68467&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68467&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68467&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68467&r=mysqlcfg

« previous php.bugs (#188720) next »