Req #66195 [NEW]: restore_error_handler() from the error_handler
| From: | david at grudl dot com | Date: | Thu, 28 Nov 2013 21:30:48 +0000 |
| Subject: | Req #66195 [NEW]: restore_error_handler() from the error_handler | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-10651@lists.php.net to get a copy of this message | ||
From: david at grudl dot com
Operating system:
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Feature/Change Request
Bug description: restore_error_handler() from the error_handler
Description:
------------
In documentation http://us2.php.net/restore_error_handler is
note:
> Calling restore_error_handler() from the error_handler function is
ignored.
I've tried it in all PHP versions from 5.3.0 to 5.5.6 and it seems that
it works and is not ignored.
Test script:
---------------
<?php
set_error_handler(function() {
echo 'one';
});
set_error_handler(function() {
echo 'two';
restore_error_handler();
});
trigger_error('', E_USER_NOTICE);
trigger_error('', E_USER_NOTICE);
--
Edit bug report at https://bugs.php.net/bug.php?id=66195&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66195&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66195&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66195&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66195&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66195&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66195&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66195&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66195&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66195&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66195&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66195&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66195&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66195&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66195&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66195&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66195&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66195&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66195&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66195&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66195&r=mysqlcfg