PHP变量
Because PHP was based on Perl which used $, though the symbols Perl used were meaningful and
plenty used to indicate the data type, ( such as @ used to indicate an array ) PHP just has $.
PHP in its early stages was a simplistic version of Perl but over time incorporated more of
Perl’s features, though one may argue PHP is still a simplistic primitive version of Perl since
to this day most installed versions of it don’t include features that have been around in
other languages forever, such as closures/namespacing.
http://en.wikipedia.org/wiki/PHP
这里说明了早期PHP是借鉴Perl语言的,所以采用了Perl语言命名变量的方式。
个人理解:
标识变量,例如在双引号里面直接写变量,看到$就是变量一目了然等。