What do you call this type of Variable &$a | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What do you call this type of Variable &$a

I have come across variable such as $a and $b but what does the and symbol does at the start of the variable..

16th Apr 2017, 4:50 PM
Shiblu Miah
Shiblu Miah - avatar
1 Answer
+ 2
It means instead of assigning a value to the variable $a , it will just assign a reference to the variable. The ampersand preceding a variable represents a reference to the original
16th Apr 2017, 5:01 PM
Santosh Pothina
Santosh Pothina - avatar