Consider:
$smarty =& SESmarty::getInstance();
What is the & for?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It passes by reference. Meaning that it won’t create a copy of the value passed.
See:
http://php.net/manual/en/language.references.php (See Adam’s Answer)
Usually, if you pass something like this:
The original variable (
$a) won’t be modified if you change the second variable ($b) . If you pass by reference:The original is changed as well.
Which is useless when passing around objects, because they will be passed by reference by default.