Re: php7- dropping the $ from the variable name - rfc
| From: | Rasmus Lerdorf | Date: | Thu, 18 Sep 2008 14:58:33 +0000 |
| Subject: | Re: php7- dropping the $ from the variable name - rfc | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-40545@lists.php.net to get a copy of this message | ||
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 itAnd how do you propose to do string interpolation? echo "This is a $var in a string"; or: echo <<<EOB This is a $var in a heredoc EOB; This is the heart and soul of PHP which isn't possible without a way to identify a variable. I suppose you could argue that you would have two ways to indicate a variable, $var for interpolation and var without, but that gets even messier. One consistent way is cleaner. -RasmusFrom what i understand $ in front of variables is an Perl legacy