note 51376 added to function.eval
| From: | tom at osu1 dot php dot net | Date: | Tue, 29 Mar 2005 07:59:37 +0000 |
| Subject: | note 51376 added to function.eval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-87128@lists.php.net to get a copy of this message | ||
Eval can't be used as a callback function so if you want to use the eval function name
dynamically use this simple work around:
<?
if ($function_name == "eval")
{
eval($stuff);
}
else
{
$function_name($stuff);
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.eval.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51376
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51376&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51376&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51376&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51376&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51376&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51376&report=yes
Search -- http://master.php.net/manage/user-notes.php