3v4l.org

run code in 300+ PHP versions simultaneously
<?php function customErrorHandler($errno, $errstr, $errfile, $errline) { if (strpos($errstr, 'Undefined array key') !== false) { return true; } return false; } set_error_handler("customErrorHandler", E_WARNING); $hello = []; echo $hello["var"];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ittmY
function name:  (null)
number of ops:  8
compiled vars:  !0 = $hello
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'customErrorHandler'
          2        SEND_VAL                                                 2
          3        DO_ICALL                                                 
   13     4        ASSIGN                                                   !0, <array>
   15     5        FETCH_DIM_R                                      ~3      !0, 'var'
          6        ECHO                                                     ~3
          7      > RETURN                                                   1

Function customerrorhandler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ittmY
function name:  customErrorHandler
number of ops:  13
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    5     4        INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 'Undefined+array+key'
          7        DO_ICALL                                         $4      
          8        TYPE_CHECK                                  1018          $4
          9      > JMPZ                                                     ~5, ->11
    6    10    > > RETURN                                                   <true>
    8    11    > > RETURN                                                   <false>
    9    12*     > RETURN                                                   null

End of function customerrorhandler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.74 ms | 1011 KiB | 15 Q