[PHP-DEV] Making a method called list or other language constructs names.

2006-12-04 Thread Urbanose
Hello there :] I wanted to build a method called list. The problem is that once I do that, I get a PHP Parse error: syntax error, unexpected T_LIST, expecting T_STRING error, because it's a language construct. Here's the code that leads me to this error : ?php class Foo { function

Re: [PHP-DEV] Making a method called list or other language constructs names.

2006-12-04 Thread Antony Dovgal
On 12/04/2006 05:22 PM, Urbanose wrote: And it works. So there's my question : why can't we make methods with the same name as those used by language constructs ? I don't see the point. http://www.php.net/manual/en/reserved.php The point is that these names are reserved by the parser and