note 14221 deleted from function.eval by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 23:25:25 +0000 |
| Subject: | note 14221 deleted from function.eval by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22324@lists.php.net to get a copy of this message | ||
eval can be used as a function.
$a=2;
$b=20;
$teststr="if ($a>10) return true;";
$teststr2="if ($b>10) return true;";
if ((eval($teststr)) && (eval($teststr2))){
echo "true";
} else {
echo "false";
}
i get to use this when my $teststr and $teststr2 test condition depends on other variables.