I have found this line in a php book is it right? I do not know if the ‘this->objects[key]‘ is like this.
Here is the line:
this->objects[ $key ] = new $object( $this);
Is this a mistake by the author? I am talking about the ‘this’ variable.
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 guess the author just forgot the dollar sign in front of the $this variable.