Re: method names matching construct names throw parser errors
| From: | Rasmus Lerdorf | Date: | Wed, 18 Apr 2001 03:55:57 +0000 |
| Subject: | Re: method names matching construct names throw parser errors | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-51852@lists.php.net to get a copy of this message | ||
> What is the chance this will change?
>
> class foo
> {
> function fopen()
> {
> echo "fopen()\n" ;
> }
> }
>
> is perfectly valid, but
>
> class foo
> {
> function include()
> {
> echo "include()\n" ;
> }
> }
>
> throws parser error ('expecting T_STRING...').
> This is quite annoying.
Unlikely. Overloading language primitives could get really nasty.
-Rasmus