note 18189 added to functions.variable-functions
| From: | retro at enx dot org | Date: | Mon, 14 Jan 2002 00:18:07 +0000 |
| Subject: | note 18189 added to functions.variable-functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24785@lists.php.net to get a copy of this message | ||
Another way to have php parse a variable within an object as a function is to simply set a temporary
variable to its value. For example:
$obj->myfunction = "foo";
$x = $obj->myfunction;
$x(); // calls the function named "foo"
--
http://www.php.net/manual/en/functions.variable-functions.php
http://master.php.net/manage/user-notes.php?action=edit+18189
http://master.php.net/manage/user-notes.php?action=delete+18189
http://master.php.net/manage/user-notes.php?action=reject+18189