3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { try { throw new Exception("ex1"); } finally { try { throw new Exception("ex2"); } catch (Exception $e) { echo "caught exception in finally block: $e ....\n"; } echo "end of finally.\n"; } } try { foo(); echo "this should not be executed.\n"; } catch (Exception $e) { echo "caught exception from foo() call: $e ....\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cqa9i
function name:  (null)
number of ops:  10
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0          
   18     2        ECHO                                                     'this+should+not+be+executed.%0A'
          3      > JMP                                                      ->9
   19     4  E > > CATCH                                       last         'Exception'
   20     5    >   ROPE_INIT                                     3  ~3      'caught+exception+from+foo%28%29+call%3A+'
          6        ROPE_ADD                                      1  ~3      ~3, !0
          7        ROPE_END                                      2  ~2      ~3, '+....%0A'
          8        ECHO                                                     ~2
   21     9    > > 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: 11
Branch analysis from position: 11
2 jumps found. (Code = 107) Position 1 = 12, Position 2 = -2
Branch analysis from position: 12
1 jumps found. (Code = 163) Position 1 = -2
filename:       /in/Cqa9i
function name:  foo
number of ops:  19
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'Exception'
          1        SEND_VAL_EX                                              'ex1'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $2
    6     4*       FAST_CALL                                                ->6
          5*       JMP                                                      ->18
    8     6*       NEW                                              $4      'Exception'
          7*       SEND_VAL_EX                                              'ex2'
          8*       DO_FCALL                                      0          
          9*       THROW                                         0          $4
         10*       JMP                                                      ->16
    9    11  E > > CATCH                                       last         'Exception'
   10    12    >   ROPE_INIT                                     3  ~7      'caught+exception+in+finally+block%3A+'
         13        ROPE_ADD                                      1  ~7      ~7, !0
         14        ROPE_END                                      2  ~6      ~7, '+....%0A'
         15        ECHO                                                     ~6
   12    16        ECHO                                                     'end+of+finally.%0A'
         17      > FAST_RET                                                 
   14    18*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.22 ms | 1398 KiB | 14 Q