note 16449 added to functions.variable-functions
| From: | jpaulo_NO at php2 dot chek dot com | Date: | Wed, 31 Oct 2001 04:45:56 +0000 |
| Subject: | note 16449 added to functions.variable-functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-19690@lists.php.net to get a copy of this message | ||
It would be great to define the function names on the fly. But
this doesn't work:
$funcs[foo] = "FOO_X";
function $funcs[foo]($var){
//blabla
}
$funcs[foo]($var='0');
Won't work...
Why assign the values twice?? One to the function itself and other to the variable through which we
want to call it!?
Any idea to define and call it with the same var?
João Paulo M. Fischer
--
http://www.php.net/manual/en/functions.variable-functions.php
http://master.php.net/manage/user-notes.php?action=edit+16449
http://master.php.net/manage/user-notes.php?action=delete+16449
http://master.php.net/manage/user-notes.php?action=reject+16449