これは私のコードです。
$script = $row['script'];
// $row is from database and the $row['script'] is exeactly the same with $script commented below.
// $script ="global \$timedate;\$target =\$timedate->now();return \$target;";
return eval($script);
$script のコメントを外すと、正しく実行されます。ただし、$script にコメントを付けて $row['script'] から値をロードすると、eval で以下のエラーが発生します。
[12-May-2012 22:09:25 UTC] PHP Parse error: syntax error, unexpected $end in C:\Users\iopen\Documents\IOPEN\Project\Clients\sugarcrm\hfcrmlocal\custom\modules\iopenwf\model\IOpenAction.php(56) : eval()'d code on line 3
何か案が?