|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-29 11:41 UTC] lbarnaud@php.net
[2009-05-29 11:49 UTC] lbarnaud@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 08:00:02 2025 UTC |
Description: ------------ First, I don't think this is PHP 5.3 RC related or Linux related, but at the moment I have no chace to check on XP with 5.2. Neither did I know which category it should be in. Please check this, thanks. It took a while to find this. The real problem is shown in the reproduce code section. This code works, it calls x() which will throw an Exception and output "ERROR" <?php try { function x() { throw new Exception("ERROR"); } (x()); } catch(Exception $e) { echo($e -> getMessage()); } ?> Reproduce code: --------------- <?php try { function x() { throw new Exception("ERROR"); } x(x()); } catch(Exception $e) { echo($e -> getMessage()); } ?> Expected result: ---------------- Expected would that the inner x() will throw the Exception, the outer one would be skipped and I get the "ERROR" string from the Exception in the catch Actual result: -------------- a blank page.