note 9401 deleted from language.oop by didou
| From: | didou@php.net | Date: | Sun, 07 Dec 2003 02:37:28 +0000 |
| Subject: | note 9401 deleted from language.oop by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-61541@lists.php.net to get a copy of this message | ||
Note Submitter: eggbird@bigfoot.com
----
[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.