|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51861 While loop executes even though Exception has been thrown
Submitted: 2010-05-19 17:46 UTC Modified: 2013-02-18 00:34 UTC
Avg. Score:3.0 ± 2.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: pim at lemonbit dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 5.2.13 OS: CentOS 5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: pim at lemonbit dot com
New email:
PHP Version: OS:


 [2010-05-19 17:46 UTC] pim at lemonbit dot com
Test script is pretty self-explanatory: even though an exception is thrown a 
while(true) loop gets exectued afterwards.

Test script:

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-20 08:20 UTC]
-Status: Open +Status: Feedback
 [2010-05-20 08:20 UTC]
Please try using this snapshot:
For Windows:

Bails out for me.
 [2010-05-20 09:57 UTC] pim at lemonbit dot com
We're seeing this on all our CentOS 5 servers with PHP 5.2.13, but not on our 
CentOS 4 machines though.
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 03:01:29 2024 UTC