Re: [PHP] PHP eval() fatal error

2007-08-26 Thread Richard Lynch
On Mon, August 20, 2007 8:54 am, 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: > > $code = ' $returnValue = 12*A+; '; // Clearly inco

Re: [PHP] PHP eval() fatal error

2007-08-20 Thread Stut
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

[PHP] PHP eval() fatal error

2007-08-20 Thread Maarten Balliauw
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 $ex) { var_dump($ex); }