Bug #13951 Updated: function named List() in class cause parse error

From: Date: Tue, 06 Nov 2001 12:20:12 +0000
Subject: Bug #13951 Updated: function named List() in class cause parse error
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-69691@lists.php.net to get a copy of this message
ID: 13951 Updated by: jeroen Reported By: shelby@DownloadFAST.com Old Status: Open Status: Bogus Bug Type: Class/Object related Operating System: FreeBSD 4.2 PHP Version: 4.0.6 New Comment: list is a language construct, see www.php.net/list (see also the reserved words appendix) Not a bug Previous Comments: ------------------------------------------------------------------------ [2001-11-06 06:10:45] shelby@DownloadFAST.com I get parse error: Parse error: parse error, expecting `T_STRING' on line: function List() which is the beginning of a function within a class. If I change the name to any thing else, then parse error goes away: function Lists() I don't know what to make of this error. I even tried removing all the other code in the class, and still got the error. Only changing the name to any thing but List() seems to fix it. Is this an erroneous name space collision? Is List() a reserved function name for class? Let me know if you can't reproduce, then I'll have to find some time to extract an isolated simple example from my complex code base. I hope I haven't reported something that will be obvious to me later, but I really think this must be a bug because how could changing the name affect the parsing error of a function declaration. ...excuse me... not too much sleep when I wrote this... ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13951&edit=1

« previous php.dev (#69691) next »