why is $ sign used before variables in Php? what does it means? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

why is $ sign used before variables in Php? what does it means?

what does that $ sign means actualy?

14th Aug 2019, 7:22 PM
Anurag Kasudhan
1 Answer
+ 2
The use of the $ sign results from historical reasons. PHP was originally developed as a replacement for the Perl language. Variables in Perl also use a $ sign. Perl, in turn, originates from miscellaneous Unix-scripting languages. Those Unix shell variables typically used (and still use) the $ sign as prefix, to access their values.
14th Aug 2019, 7:47 PM
Michael
Michael - avatar