note 9392 added to Classes and Objects

From: Date: Tue, 31 Oct 2000 20:32:33 +0000
Subject: note 9392 added to Classes and Objects
Groups: php.notes 
Request: Send a blank email to php-notes+get-7217@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. http://www.php.net/manual/language.oop.php

« previous php.notes (#7217) next »