From: arnoud at rattink dot com Operating system: SuSE Linux 8.2 PHP version: 5.0.0RC2 PHP Bug Type: Zend Engine 2 problem Bug description: Throwing exception in eval'led code is not handled correctly
Description: ------------ The code below prints GRRRRRRRR. This is incorrect as the throwing of the exception is supposed to bring us immediately to the catchblock. It is also inconsistent, since I can replace the eval with just $f = AAAAAARRRRRRRRG(); and then it skips the echo. Reproduce code: --------------- <? function AAAAAARRRRRRG(){ throw new Exception("AAAAAARRRRRRG"); } try { eval('$f = AAAAAARRRRRRG();'); echo "GRRRRRRRR\n"; } catch(Exception $e) { echo "Exception caught nice and clean\n"; } ?> Expected result: ---------------- I do not expect to see GRRRRRRRR. Actual result: -------------- GRRRRRRRR Exception caught nice and clean -- Edit bug report at http://bugs.php.net/?id=28290&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28290&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28290&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28290&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28290&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28290&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28290&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28290&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28290&r=support Expected behavior: http://bugs.php.net/fix.php?id=28290&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28290&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28290&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28290&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28290&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28290&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28290&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28290&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28290&r=float