Hi team.
The bug I'm posting is somehow similar to #314. The demo script is below.
<?php
/*
CATCH bug demonstration
BUG PRESENT in PHP 5.2.5 with eAccelerator 0.9.5.3
Bug not present in PHP 5.2.5 without eAccelerator (disabled through php.ini)
*/
error_reporting(E_ALL);
class LocalException extends Exception {}
function main()
{
echo "main() inv<br>";
try
{
# Comment all *{n} blocks and Exception will be caught
# Enable only *2 and Exception WILL NOT be caught (BUG?)
# Enable only *4 and Exception WILL NOT be caught (BUG?)
# Enable only *1 and *2 and Exception will be caught
# Enable only *2 and *3 and Exception will be caught
# echo "*1<br>"; # *1
if (0) {} # *2
# echo "*3<br>"; # *3
# if (1) {} # *4
try
{
throw new Exception("thrown from try-2");
} catch (LocalException $e) {} # must not sense exception thrown
} catch (Exception $e)
{
echo "Caught Exception (all OK)<br>";
}
echo "main() finished<br>";
}
main();
?>