Re: Re: php7- dropping the $ from the variable name - rfc
| From: | Dmitry Stogov | Date: | Fri, 19 Sep 2008 10:39:02 +0000 |
| Subject: | Re: Re: php7- dropping the $ from the variable name - rfc | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-40564@lists.php.net to get a copy of this message | ||
Greg Beaver wrote:
> marius popa wrote:
>> I was looking at the examples used in php.js library
>> http://phpjs.org/functions/index
>> and it struck me that is cleaner to read the functions and code without the
>> $ names in it
>>
>> From what i understand $ in front of variables is an Perl legacy
>
> This would also eliminate constants from PHP, as currently they are
> T_STRING and variables would become T_STRING. Not a good idea.
>
> <?php
> define('oops', 1);
> $oops = 2;
> echo $oops,' ',oops;
> ?>
From my point of view, it's not a good idea to have classes, functions,
constants and variables with the same "conflicting" names (PHP way).
Anyway, I'm not going to change it.
Thanks. Dmitry.