I have this code
$myNewClass->cars =& Orders_Car::GetRecords($myNewClass->searchString);
^
what is & doing there.
thanks
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.
Read Do not use PHP references by PHP expert Johannes Schlüter
PHP references are a holdover from PHP 4, where objects were passed by value instead of by reference unless you deliberately made them by reference. This isn’t necessary when using PHP 5, because all objects are passed by reference in PHP 5 all the time.
Scalars and arrays are still passed by value by default in PHP 5. If you need to pass them by reference, you should just use an object.