Doc #48969 [Com]: register_shutdown_function() buggy in combination with set_error_handler()
| From: | josh at jj88 dot org | Date: | Tue, 17 Jul 2012 02:24:30 +0000 |
| Subject: | Doc #48969 [Com]: register_shutdown_function() buggy in combination with set_error_handler() | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-8557@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=48969&edit=1
ID: 48969
Comment by: josh at jj88 dot org
Reported by: bschussek at gmail dot com
Summary: register_shutdown_function() buggy in combination
with set_error_handler()
Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: Linux Ubuntu 9.04
PHP Version: 5.2.10
Assigned To: kalle
Block user comment: N
Private report: N
New Comment:
See https://bugs.php.net/bug.php?id=60909 and https://bugs.php.net/bug.php?
id=61767 for additional information.
Previous Comments:
------------------------------------------------------------------------
[2010-01-13 02:11:59] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
------------------------------------------------------------------------
[2010-01-13 02:09:45] svn@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=293478
Log: Fixed bug #48969 (register_shutdown_function() buggy in combination with set_error_handler())
------------------------------------------------------------------------
[2009-07-21 13:25:53] bschussek at gmail dot com
I still don't quite understand this. Shouldn't my above code behave the same way as this
code?
Code:
-----
function shutdown()
{
var_dump('SHUTDOWN');
}
register_shutdown_function('shutdown');
throw new Exception('my exception');
Output:
-------
Exception: my exception in ...
string(8) "SHUTDOWN"
The only code difference is that in the original code the exception was thrown from within the error
handler. AND that in the original code the shutdown function was not called.)
------------------------------------------------------------------------
[2009-07-21 12:58:08] jani@php.net
This is really documentation issue. You can't call _any_ user callbacks (f.e. using
call_user_func() & such) when there are uncaught exceptions.
------------------------------------------------------------------------
[2009-07-21 12:50:35] jani@php.net
One more thing: The shutdown func WILL be run. As long as there are no uncaught exceptions left.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=48969
--
Edit this bug report at https://bugs.php.net/bug.php?id=48969&edit=1