|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-10-06 18:55 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2014-10-06 18:55 UTC] nikic@php.net
[2014-10-07 07:47 UTC] willem at mollie dot nl
[2015-02-16 20:07 UTC] marc at gutt dot it
[2015-05-26 16:46 UTC] chrisdmiddleton at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 15:00:01 2025 UTC |
Description: ------------ The function error_get_last() ignores the silence operator. Functions such as set_error_handler() received 0 as the value for the error type when the silence operator is used on the expression that triggered the error. However, error_get_last() does not. This is rather inconsistent and makes it impossible to ignore errors when using error_get_last() for error handling (e.g. in a registered shutdown function). Test script: --------------- php -r '@1/0; print_r(error_get_last());' Expected result: ---------------- PHP Warning: Division by zero in Command line code on line 1 Array ( [type] => 0 [message] => Division by zero [file] => Command line code [line] => 1 ) Actual result: -------------- PHP Warning: Division by zero in Command line code on line 1 Array ( [type] => 2 [message] => Division by zero [file] => Command line code [line] => 1 )