| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2016-12-01 16:35 UTC] requinix@php.net
 
-Status: Open
+Status: Feedback
  [2016-12-01 16:35 UTC] requinix@php.net
  [2016-12-01 17:10 UTC] cmb@php.net
  [2016-12-11 04:22 UTC] php-bugs at lists dot php dot net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 10:00:02 2025 UTC | 
Description: ------------ The next code: <?php $a["x"];//should trigger notice var_dump(error_get_last());//return the error array ?> runs perfectly and returns an error array. but when I use set_error_handler it returns null <?php function _do_something(){} set_error_handler('_do_something'); $a["x"];//should trigger notice var_dump(error_get_last());//return null ?> This code works perfectly on PHP5.4 I had changed 3 month ago to PHP7 and since then I am getting nulls in error_get_last() I am using a shutdown function to check if an error has occured and if so to send it to the developer. The Problem exists in all type of errors notice,warning,error,fatal Test script: --------------- function _do_something(){} set_error_handler('_do_something'); $a["x"];//should trigger notice var_dump(error_get_last());//return null Expected result: ---------------- I expect to get an array of the error, like in php 5.* Actual result: -------------- I am getting null instead of an array