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/KunoF
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/KunoF
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/KunoF
function name:  resetErrors
number of ops:  10
compiled vars:  !0 = $undefinedVariable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'set_error_handler'
          1        FETCH_THIS                                       ~1      
          2        INIT_ARRAY                                       ~2      ~1
          3        ADD_ARRAY_ELEMENT                                ~2      'dummyErrorHandler'
          4        SEND_VAL                                                 ~2
          5        SEND_VAL                                                 0
          6        DO_ICALL                                                 
    8     7        INIT_FCALL                                               'restore_error_handler'
          8        DO_ICALL                                                 
    9     9      > RETURN                                                   null

End of function reseterrors

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.48 ms | 1395 KiB | 17 Q