3v4l.org

run code in 300+ PHP versions simultaneously
<?php convertPhpErrorsToExceptions(); $array = ['hi' => 'dsa']; echo $array['unknown']; function convertPhpErrorsToExceptions() { static $isNotLoaded = true; if ($isNotLoaded) { set_error_handler('phpErrorToException'); $isNotLoaded = false; } } function phpErrorToException($severity, $message, $filename, $lineno) { if (error_reporting() & $severity) { throw new \ErrorException($message, 0, $severity, $filename, $lineno); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/emBU0
function name:  (null)
number of ops:  6
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'convertPhpErrorsToExceptions'
          1        DO_FCALL                                      0          
    4     2        ASSIGN                                                   !0, <array>
    5     3        FETCH_DIM_R                                      ~3      !0, 'unknown'
          4        ECHO                                                     ~3
   21     5      > RETURN                                                   1

Function convertphperrorstoexceptions:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/emBU0
function name:  convertPhpErrorsToExceptions
number of ops:  7
compiled vars:  !0 = $isNotLoaded
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   BIND_STATIC                                              !0
   10     1      > JMPZ                                                     !0, ->6
   11     2    >   INIT_FCALL                                               'set_error_handler'
          3        SEND_VAL                                                 'phpErrorToException'
          4        DO_ICALL                                                 
   12     5        ASSIGN                                                   !0, <false>
   14     6    > > RETURN                                                   null

End of function convertphperrorstoexceptions

Function phperrortoexception:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/emBU0
function name:  phpErrorToException
number of ops:  17
compiled vars:  !0 = $severity, !1 = $message, !2 = $filename, !3 = $lineno
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   18     4        INIT_FCALL                                               'error_reporting'
          5        DO_ICALL                                         $4      
          6        BW_AND                                           ~5      !0, $4
          7      > JMPZ                                                     ~5, ->16
   19     8    >   NEW                                              $6      'ErrorException'
          9        SEND_VAR_EX                                              !1
         10        SEND_VAL_EX                                              0
         11        SEND_VAR_EX                                              !0
         12        SEND_VAR_EX                                              !2
         13        SEND_VAR_EX                                              !3
         14        DO_FCALL                                      0          
         15      > THROW                                         0          $6
   21    16    > > RETURN                                                   null

End of function phperrortoexception

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.53 ms | 1405 KiB | 17 Q