php.net |  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
Votes:2
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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
48 + 11 = ?
Subscribe to this entry?

 
 [2010-05-19 17:46 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-20 08:20 UTC] mike@php.net
-Status: Open +Status: Feedback
 [2010-05-20 08:20 UTC] 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-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-2022 The PHP Group
All rights reserved.
Last updated: Tue Oct 04 22:05:52 2022 UTC