|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-15 22:41 UTC] derick@php.net
[2004-12-15 23:38 UTC] php_nospam at ramihyn dot sytes dot net
[2004-12-15 23:59 UTC] php_nospam at ramihyn dot sytes dot net
[2004-12-16 12:28 UTC] php_nospam at ramihyn dot sytes dot net
[2004-12-16 12:57 UTC] php_nospam at ramihyn dot sytes dot net
[2004-12-16 13:04 UTC] derick@php.net
[2004-12-29 17:15 UTC] vrana@php.net
[2005-03-21 21:49 UTC] helly@php.net
[2005-03-25 18:51 UTC] nlopess@php.net
[2006-04-12 21:11 UTC] bjori@php.net
[2007-07-21 18:07 UTC] nicobn@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 18:00:01 2025 UTC |
Description: ------------ The code below prints a fatal error. This is incorrect as the throwing of the exception is supposed to bring us immediately to the catch block. Its also inconsistent because when i replace the $bug = new Bug(); by __autoload("Bug"); the exception is handled correctly. Code following the throw is not executed, as expected. Reproduce code: --------------- function __autoload($class) { throw new Exception(); } try { $bug = new Bug(); // Results in a fatal error #__autoload("Bug"); // Prints "exception caught." } catch (Exception $e) { echo "exception caught."; } Expected result: ---------------- exception caught. Actual result: -------------- Fatal error: Function __autoload(Bug) threw an exception of type 'Exception' in D:\y\index.php on line 7