It's not the same thing. When an variable references an object then you
can change either the original object or the new variable and you will
be changing the *same* object, not a new one. Maybe this example helps?
?php
class test {
function test($val) {
global
My question is actually regarding the line $myref = $this;. The
author states that this is a reference to the class/object itself. Isn't
this like saying outside the class $myref = new test;? What would be
the point of referring to itself inside the class in this manner?
Thanks for your
Jason, thanks. Yes, I understand your example here very well. My
question actually had more to do with understanding what value was added
to the class by $myref = $this;. Perhaps it is some misunderstanding
I have of classes but, since a class is just a pattern and not an
actual, usable
3 matches
Mail list logo