#40790 [NEW]: List interface parsed as T_LIST instead of T_STRING

From: Date: Mon, 12 Mar 2007 23:02:23 +0000
Subject: #40790 [NEW]: List interface parsed as T_LIST instead of T_STRING
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-110274@lists.php.net to get a copy of this message
From: markpk at gmail dot com Operating system: PHP version: 5.2.1 PHP Bug Type: Scripting Engine problem Bug description: List interface parsed as T_LIST instead of T_STRING Description: ------------ An object named List, named after a common data structure, is parsed as a T_LIST. I know many PHP applications use list(), but I think the engine could be made a little smarter by checking if this T_LIST could _also_ be a T_STRING in cases like these: interface List { ... } and: function anything(List $x) { ,,, } It will be appreciated if the engine detects the user is declaring an object named List and thus not parsing it as a T_LIST in this case. Because List is the name of a common data structure, it is a little bit annoying to see PHP displays a parse error instead of recognizing it as a T_STRING. -- Edit bug report at http://bugs.php.net/?id=40790&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40790&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40790&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40790&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40790&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40790&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40790&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40790&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40790&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40790&r=support Expected behavior: http://bugs.php.net/fix.php?id=40790&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40790&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40790&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40790&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40790&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40790&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40790&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40790&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40790&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40790&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40790&r=mysqlcfg

« previous php.bugs (#110274) next »