Doc #80548 [NEW]: Value or error_reporting() within handler with errors suppressed is 4437, not 0

From: Date: Thu, 24 Dec 2020 10:24:54 +0000
Subject: Doc #80548 [NEW]: Value or error_reporting() within handler with errors suppressed is 4437, not 0
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18313@lists.php.net to get a copy of this message
From: dregad at mantisbt dot org Operating system: PHP version: 8.0.0 Package: Documentation problem Bug Type: Documentation Problem Bug description:Value or error_reporting() within handler with errors suppressed is 4437, not 0 Description: ------------ According to set_error_handler documentation [1], "current value of error_reporting [...] will be 0 if the statement that caused the error was prepended by the @ error-control operator." This works as documented with PHP 7.4, but not in 8.0.0 where error_reporting = 4437. I'm not sure whether this desired behavior or not, but if it is then documentation is incorrect. [1]: https://www.php.net/manual/en/function.set-error-handler.php Test script: --------------- <?php function error_handler( $p_type, $p_error, $p_file, $p_line ) { echo "error_reporting in handler: ", error_reporting(), PHP_EOL; } set_error_handler( 'error_handler' ); @date_default_timezone_set(''); Expected result: ---------------- error_reporting = 0 Actual result: -------------- error_reporting = 4437 (with PHP 7.4, error_reporting = 0 as expected) -- Edit bug report at https://bugs.php.net/bug.php?id=80548&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80548&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80548&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80548&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80548&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80548&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80548&r=support Expected behavior: https://bugs.php.net/fix.php?id=80548&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80548&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80548&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80548&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80548&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80548&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80548&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80548&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80548&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80548&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80548&r=mysqlcfg

« previous php.doc.bugs (#18313) next »