zend engine does not provide full variable reference for variable functions
| From: | André Langhorst | Date: | Fri, 12 May 2000 09:46:04 +0000 |
| Subject: | zend engine does not provide full variable reference for variable functions | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14885@lists.php.net to get a copy of this message | ||
Hi Andi,
I think PHP does not support full variable reference as described for "quoted strings" (in What´s new on zend site), does this reference not apply for variable functions?
I tried to execute a variable function, the executing doesn´t know neither if it´s a function nor if it´s a method, nor if it´s method from an instance in an instance...
I want to access this method $this->db->query(), that works of course.
1.) slightly changed (but for my function useless) it still works
$a='db';
$b='query';
$this->$a->$b() // this works too
2.) This does not work
$str='db->query';
$this->$str();
nor this
$this->${a->b}() // in fact, useless for me too, but tried out for debugging
nor this
${this->a->b} // php tries to instantinate query, why?
nor this
$str='this->a->b'; // parse error
${str}
$$str;
I tried almost every possible combination. But I did not find any working one. Isn´t it possible in PHP (would be a great loss)?
André