note 51376 modified in function.eval by danbrown
| From: | danbrown@php.net | Date: | Tue, 25 Nov 2008 16:08:34 +0000 |
| Subject: | note 51376 modified in function.eval by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-146946@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:
<?php
if ($function_name == "eval")
{
eval($stuff);
}
else
{
$function_name($stuff);
}
?>
--was--
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);
}
?>
http://php.net/manual/en/function.eval.php