Bug #51861 [Com]: While loop executes even though Exception has been thrown

From: Date: Thu, 20 May 2010 07:57:11 +0000
Subject: Bug #51861 [Com]: While loop executes even though Exception has been thrown
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-150642@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51861&edit=1

 ID:               51861
 Comment by:       pim at lemonbit dot com
 Reported by:      pim at lemonbit dot com
 Summary:          While loop executes even though Exception has been
                   thrown
 Status:           Feedback
 Type:             Bug
 Package:          Unknown/Other Function
 Operating System: CentOS 5
 PHP Version:      5.2.13

 New Comment:

We're seeing this on all our CentOS 5 servers with PHP 5.2.13, but not
on our 
CentOS 4 machines though.


Previous Comments:
------------------------------------------------------------------------
[2010-05-20 08:20:35] mike@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Bails out for me.

------------------------------------------------------------------------
[2010-05-19 17:46:26] pim at lemonbit dot com

Description:
------------
Test script is pretty self-explanatory: even though an exception is
thrown a 
while(true) loop gets exectued afterwards.

Test script:
---------------
<?php

echo "Throw exception";
throw new Exception();

echo "This should not be printed, and is not.";
while(true) {
   echo 'This should not be executed, but is!' . "\n";
}


?>

Expected result:
----------------
We did not expected the while loop to execute.

Actual result:
--------------
The while loop executed.


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51861&edit=1


Thread (4 messages)

« previous php.bugs (#150642) next »