Re: Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))
| From: | Johannes Schlüter | Date: | Tue, 12 Jul 2011 08:48:17 +0000 |
| Subject: | Re: Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long)) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53911@lists.php.net to get a copy of this message | ||
On Sun, 2011-07-10 at 19:41 +0200, Nikita Popov wrote:
> E.g. Writing
>
> class Evaluator {
> public function eval() {
>
> }
> }
>
> Does in no way create an ambiguity with the eval language construct PHP
> implements.
For a method this is correct. But for a normal function this is
different:
<?php
function eval() {
}
eval(); // will call the language construct
?>
And i consider it "strange" to allow different names for functions and
methods. And yes I'm aware that
$eval = 'eval'; $eval();
would call the function.
I fear consistency issues.
johannes