In article [EMAIL PROTECTED],
[EMAIL PROTECTED] says...
In an earlier message, Larry Rosenman [mailto:ler;lerctr.org] said ...
How about:
That's the way the language designers did it, and
there's LOTS of PRODUCTION code out there that uses it.
Because that's the way it is? Well,
*This message was transferred with a trial version of CommuniGate(tm) Pro*
Hi,
JR said:
I guess this could be true. But I don't understand why someone would need
an easy way to identify variables? Why not an easy way to identify
function names? Or constants?
For big projects and/or safety
I'm just guessing here. For one thing, to seperate variables from
constants. Also, it makes it possible to use variables within quotes.
brucedickey wrote:
I've searched, but haven't found the answer -- from a language design point
of view, why are there $ on the front of PHP variable names?
On Tue, 12 Nov 2002, brucedickey wrote:
I've searched, but haven't found the answer -- from a language design point
of view, why are there $ on the front of PHP variable names?
... so Perl converts know where there variables are ;)
~Chris
--
PHP General Mailing List
On Wednesday 13 November 2002 02:35, Leif K-Brooks wrote:
I'm just guessing here. For one thing, to seperate variables from
constants. Also, it makes it possible to use variables within quotes.
Yup. So you can have:
print I'm a $variable;
instead of the messy javascript way:
alert(I'm
So you can put variables inside quoted strings.
Without $ how would this work?
price = 9.95;
echo The price is price;
It also means you can have variables that are the same name as function
names.
-Rasmus
On Tue, 12 Nov 2002, brucedickey wrote:
I've searched, but haven't found the
: [PHP] Why $ on variable names?
On Wednesday 13 November 2002 02:35, Leif K-Brooks wrote:
I'm just guessing here. For one thing, to seperate variables from
constants. Also, it makes it possible to use variables within quotes.
Yup. So you can have:
print I'm a $variable;
instead of the messy
In an earlier message, Jason Wong [mailto:php-general;gremlins.com.hk] said
...
Yup. So you can have:
print I'm a $variable;
instead of the messy javascript way:
alert(I'm a . $variable);
But the language could still support variable evaluation within strings
without requiring the
If I can venture a comment, what you think clutters the code others
may find a quick and easy way to identify a variable in it.
Just a thought.
Marco
--
php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Come visit
In an earlier message, Marco Tabini [mailto:marcot;inicode.com] saidf ...
If I can venture a comment, what you think
clutters the code others may find a quick and
easy way to identify a variable in it.
I guess this could be true. But I don't understand why someone would need
an easy way to
How about:
That's the way the language designers did it, and there's LOTS of
PRODUCTION code out
there that uses it.
See also the precedence of PERL.
LER
--On Tuesday, November 12, 2002 16:40:46 -0500 Jonathan Rosenberg (Tabby's
Place) [EMAIL PROTECTED] wrote:
In an earlier message,
At 22:40 12.11.2002, Jonathan Rosenberg \(Tabby's Place\) said:
[snip]
I guess this could be true. But I don't understand why someone would need
an easy way to identify variables? Why not an easy way to identify
function names? Or constants?
In any case,
: [PHP] Why $ on variable names?
At 22:40 12.11.2002, Jonathan Rosenberg \(Tabby's Place\) said:
[snip]
I guess this could be true. But I don't understand why someone would need
an easy way to identify variables? Why not an easy way to identify
function
In an earlier message, Larry Rosenman [mailto:ler;lerctr.org] said ...
How about:
That's the way the language designers did it, and
there's LOTS of PRODUCTION code out there that uses it.
Because that's the way it is? Well, that's good enough for me. I'll
never question anything else again
--On Tuesday, November 12, 2002 16:53:07 -0500 Jonathan Rosenberg (Tabby's
Place) [EMAIL PROTECTED] wrote:
In an earlier message, Larry Rosenman [mailto:ler;lerctr.org] said ...
How about:
That's the way the language designers did it, and
there's LOTS of PRODUCTION code out there that
In an earlier message, Ernest E Vogelsinger [mailto:ernest;vogelsinger.at]
said ...
Think of how an interpreter works. It parses the
sourcecode in realtime, not as a compiler. People must
_wait_, every time, until it is finished,
not only once like a compiler. Thus designers of
interpreted
16 matches
Mail list logo