note 9401 modified in Classes and Objects by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Wed, 01 Nov 2000 20:18:58 +0000 |
| Subject: | note 9401 modified in Classes and Objects by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-7248@lists.php.net to get a copy of this message | ||
[Editor's note: This has to do with the ambiguity of the expression used. When the assignment
fails it is because the expression could mean "the property 'tuut' of the object
'$this->memberobject'" or "the property 'memberobject->tuut' of
the object '$this'", parsing of variables inside quotes in which you have a complex
expression is not recommended, the way it should be done is by using the concatenation operator,
which is why the last assignment works. This is a know behaviour, see for example the "Variable
variables" section of the manual.]
i might be wrong here, but to me it seems that (within a method) something like this:
$bla = "boink and $this->tuut";
does work, but not this:
$bla = "boink and $this->memberobject->tuut";
I had to resort to
$bla = "boink and ".$this->memberobject->tuut;
in this case.
http://www.php.net/manual/classes-and-objects.php