note 9392 deleted from language.oop by victor
| From: | victor@php.net | Date: | Sat, 07 Dec 2002 15:43:20 +0000 |
| Subject: | note 9392 deleted from language.oop by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40475@lists.php.net to get a copy of this message | ||
eval () can be handy in getting around quirks or limitations with the PHP parser.
To call a variable method with the name of the method stored in a class variable try:
eval("\$this->".$this->nameofmethod."();");
The other more straighforward ways of doing this allong the lines of $this->$variablefunction ()
don't seem to work.