3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo ($a) { try { echo "1"; try { echo "2"; throw new Exception("ex"); } catch (Exception $e) { echo "3"; } finally { echo "4"; throw new Exception("ex"); } } catch (Exception $e) { echo "3"; } finally { echo "2"; } return 1; } var_dump(foo("para"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ENpAg
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'foo'
          2        SEND_VAL                                                 'para'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
2 jumps found. (Code = 162) Position 1 = 12, Position 2 = 11
Branch analysis from position: 12
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 162) Position 1 = 23, Position 2 = 22
Branch analysis from position: 23
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
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
2 jumps found. (Code = 162) Position 1 = 23, Position 2 = 22
Branch analysis from position: 23
Branch analysis from position: 22
filename:       /in/ENpAg
function name:  foo
number of ops:  27
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ECHO                                                     '1'
    6     2        ECHO                                                     '2'
    7     3        NEW                                              $4      'Exception'
          4        SEND_VAL_EX                                              'ex'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $4
          7*       JMP                                                      ->10
    8     8  E > > CATCH                                       last         'Exception'
    9     9    >   ECHO                                                     '3'
   10    10      > FAST_CALL                                                ->12
         11    > > JMP                                                      ->18
   11    12    >   ECHO                                                     '4'
   12    13        NEW                                              $6      'Exception'
         14        SEND_VAL_EX                                              'ex'
         15        DO_FCALL                                      0          
         16      > THROW                                         0          $6
         17*       FAST_RET                                                 
         18    > > JMP                                                      ->21
   14    19  E > > CATCH                                       last         'Exception'
   15    20    >   ECHO                                                     '3'
   16    21    > > FAST_CALL                                                ->23
         22    > > JMP                                                      ->25
   17    23    >   ECHO                                                     '2'
         24      > FAST_RET                                                 
   19    25    > > RETURN                                                   1
   20    26*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.04 ms | 1403 KiB | 16 Q