What is Call Time Pass Reference? What does it do?
Share
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.
I assume you mean Call Time Pass By Reference.
In PHP, the
&operator will get the reference of the variable (There is lots of info on this on stackoverflow)Call time pass by reference is where you pass a reference as an argument to a function that doesn’t take a reference
This will give a warning in PHP 5.3 as it as been deprecated and it will be passed by value. The correct way to do it is to alter the function foo to take a reference
The ability to preform call time pass by reference is controlled by the ini setting
In more recent releases this is off by default.
The reason why it is bad is that the function (and reader) doesn’t know which parameters are references and which aren’t. It makes the code a lot harder to follow.