3v4l.org

run code in 300+ PHP versions simultaneously
<?php function errorHandler($errno, $errstr, $errfile, $errline) { print_r(['This invoked custom error handler', $errno, $errstr, $errfile, $errline]); } function errorHandlerWithoutWarnings($errno, $errstr, $errfile, $errline) { print_r(['This invoked custom error handler errorHandlerWithoutWarnings', $errno, $errstr, $errfile, $errline]); } set_error_handler('errorHandler', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); $a = []; echo $a['fooo']; set_error_handler('errorHandlerWithoutWarnings', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_WARNING); $a = []; echo $a['fooo'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u274a
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'errorHandler'
          2        SEND_VAL                                                 22519
          3        DO_ICALL                                                 
   10     4        ASSIGN                                                   !0, <array>
   11     5        FETCH_DIM_R                                      ~3      !0, 'fooo'
          6        ECHO                                                     ~3
   13     7        INIT_FCALL                                               'set_error_handler'
          8        SEND_VAL                                                 'errorHandlerWithoutWarnings'
          9        SEND_VAL                                                 22517
         10        DO_ICALL                                                 
   14    11        ASSIGN                                                   !0, <array>
   15    12        FETCH_DIM_R                                      ~6      !0, 'fooo'
         13        ECHO                                                     ~6
         14      > RETURN                                                   1

Function errorhandler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u274a
function name:  errorHandler
number of ops:  13
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    3     4        INIT_FCALL                                               'print_r'
          5        INIT_ARRAY                                       ~4      'This+invoked+custom+error+handler'
          6        ADD_ARRAY_ELEMENT                                ~4      !0
          7        ADD_ARRAY_ELEMENT                                ~4      !1
          8        ADD_ARRAY_ELEMENT                                ~4      !2
          9        ADD_ARRAY_ELEMENT                                ~4      !3
         10        SEND_VAL                                                 ~4
         11        DO_ICALL                                                 
    4    12      > RETURN                                                   null

End of function errorhandler

Function errorhandlerwithoutwarnings:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u274a
function name:  errorHandlerWithoutWarnings
number of ops:  13
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    7     4        INIT_FCALL                                               'print_r'
          5        INIT_ARRAY                                       ~4      'This+invoked+custom+error+handler+errorHandlerWithoutWarnings'
          6        ADD_ARRAY_ELEMENT                                ~4      !0
          7        ADD_ARRAY_ELEMENT                                ~4      !1
          8        ADD_ARRAY_ELEMENT                                ~4      !2
          9        ADD_ARRAY_ELEMENT                                ~4      !3
         10        SEND_VAL                                                 ~4
         11        DO_ICALL                                                 
    8    12      > RETURN                                                   null

End of function errorhandlerwithoutwarnings

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.69 ms | 1451 KiB | 15 Q