On Mon, August 27, 2007 12:59 am, Maarten Balliauw wrote:
> Now let's repeat my question: is there any way to gracefully evaluate
> specific code, eventually catch an error and respond to that, without
> using parsekit() or launching another process to get this done?
I missed that you had an E_ERR
When re-writing this example to a form of "create_function", the same
problem occurs:
$temporaryCalculationFunction = @create_function('', $code); // E_ERROR
here
if ($temporaryCalculationFunction === FALSE) {
$returnValue = '#N/A';
} else {
$returnValue =
Maarten Balliauw wrote:
Here's the thing: I'm trying to do some dynamic code compilation within
PHP using eval(). The code I'm trying to compile raises an E_ERROR (Fatal).
Here's a simple example:
Now, I'd like to catch the error made by eval:
// ...
try {
eval($code);
} catch (Exception
3 matches
Mail list logo