3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { if (!function_exists('handleException')) { function handleException() { echo logException(); trigger_warning();} function logException() { return 'bar';} } if (!function_exists('handleException')) { function handleException() { echo logException(); trigger_warning();} function logException() { return 'bar';} } throw new \Exception('boo'); } catch (\Exception $e) { handleException(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 14
Branch analysis from position: 7
Found catch point at position: 19
Branch analysis from position: 19
2 jumps found. (Code = 107) Position 1 = 20, Position 2 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n35YW
function name:  (null)
number of ops:  23
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'handleException'
          2        DO_ICALL                                         $1      
          3        BOOL_NOT                                         ~2      $1
          4      > JMPZ                                                     ~2, ->7
    4     5    >   DECLARE_FUNCTION                                         'handleexception'
    5     6        DECLARE_FUNCTION                                         'logexception'
    7     7    >   INIT_FCALL                                               'function_exists'
          8        SEND_VAL                                                 'handleException'
          9        DO_ICALL                                         $3      
         10        BOOL_NOT                                         ~4      $3
         11      > JMPZ                                                     ~4, ->14
    8    12    >   DECLARE_FUNCTION                                         'handleexception'
    9    13        DECLARE_FUNCTION                                         'logexception'
   11    14    >   NEW                                              $5      'Exception'
         15        SEND_VAL_EX                                              'boo'
         16        DO_FCALL                                      0          
         17      > THROW                                         0          $5
         18*       JMP                                                      ->22
   12    19  E > > CATCH                                       last         'Exception'
   13    20    >   INIT_FCALL_BY_NAME                                       'handleException'
         21        DO_FCALL                                      0          
   14    22      > RETURN                                                   1

Function %00handleexception%2Fin%2Fn35YW%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n35YW
function name:  handleException
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'logException'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3        INIT_FCALL_BY_NAME                                       'trigger_warning'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   null

End of function %00handleexception%2Fin%2Fn35YW%3A4%240

Function %00logexception%2Fin%2Fn35YW%3A5%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n35YW
function name:  logException
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   'bar'
          1*     > RETURN                                                   null

End of function %00logexception%2Fin%2Fn35YW%3A5%241

Function %00handleexception%2Fin%2Fn35YW%3A8%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n35YW
function name:  handleException
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL_BY_NAME                                       'logException'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3        INIT_FCALL_BY_NAME                                       'trigger_warning'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   null

End of function %00handleexception%2Fin%2Fn35YW%3A8%242

Function %00logexception%2Fin%2Fn35YW%3A9%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n35YW
function name:  logException
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   'bar'
          1*     > RETURN                                                   null

End of function %00logexception%2Fin%2Fn35YW%3A9%243

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.55 ms | 1400 KiB | 15 Q