3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { private function dummyErrorHandler() { return false; } public function resetErrors() { set_error_handler(array($this, 'dummyErrorHandler'), 0); @$undefinedVariable; restore_error_handler(); } } $e = new Example; $e->resetErrors();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ulNg4
function name:  (null)
number of ops:  6
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_METHOD_CALL                                         !0, 'resetErrors'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Example:
Function dummyerrorhandler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ulNg4
function name:  dummyErrorHandler
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   <false>
          1*     > RETURN                                                   null

End of function dummyerrorhandler

Function reseterrors:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ulNg4
function name:  resetErrors
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'set_error_handler'
          1        FETCH_THIS                                       ~0      
          2        INIT_ARRAY                                       ~1      ~0
          3        ADD_ARRAY_ELEMENT                                ~1      'dummyErrorHandler'
          4        SEND_VAL                                                 ~1
          5        SEND_VAL                                                 0
          6        DO_ICALL                                                 
    7     7        BEGIN_SILENCE                                    ~3      
          8        FETCH_R                      local               ~4      'undefinedVariable'
          9        END_SILENCE                                              ~3
         10        FREE                                                     ~4
    8    11        INIT_FCALL                                               'restore_error_handler'
         12        DO_ICALL                                                 
    9    13      > RETURN                                                   null

End of function reseterrors

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.58 ms | 1396 KiB | 17 Q