3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { echo "1 try\n"; try { echo "2 try\n"; // 必ず try 中で例外が投げられる throw new \Exception("in try exception"); } catch(\Exception $e) { echo "3 catch\n"; echo " ". $e->getMessage()."\n"; throw $e;// ここで try 由来の例外を更に上に投げる } finally { echo "4 finally\n"; // finally 中でも例外を投げる throw new \Exception("in finally exception"); } } catch(\Exception $e) { // ↑の投げられた例外をキャッチ echo "5 catch\n"; echo " ". $e->getMessage()."\n"; } finally { echo "6 finally\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 24
Branch analysis from position: 24
2 jumps found. (Code = 107) Position 1 = 25, Position 2 = -2
Branch analysis from position: 25
2 jumps found. (Code = 162) Position 1 = 33, Position 2 = 32
Branch analysis from position: 33
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LoILl
function name:  (null)
number of ops:  36
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     '1+try%0A'
    6     1        ECHO                                                     '2+try%0A'
    8     2        NEW                                              $3      'Exception'
          3        SEND_VAL_EX                                              'in+try+exception'
          4        DO_FCALL                                      0          
          5      > THROW                                         0          $3
          6*       JMP                                                      ->15
    9     7  E > > CATCH                                       last         'Exception'
   10     8    >   ECHO                                                     '3+catch%0A'
   11     9        INIT_METHOD_CALL                                         !0, 'getMessage'
         10        DO_FCALL                                      0  $5      
         11        CONCAT                                           ~6      '++', $5
         12        CONCAT                                           ~7      ~6, '%0A'
         13        ECHO                                                     ~7
   12    14      > THROW                                         0          !0
   13    15*       FAST_CALL                                                ->17
         16*       JMP                                                      ->23
   14    17*       ECHO                                                     '4+finally%0A'
   16    18*       NEW                                              $8      'Exception'
         19*       SEND_VAL_EX                                              'in+finally+exception'
         20*       DO_FCALL                                      0          
         21*       THROW                                         0          $8
         22*       FAST_RET                                                 
         23*       JMP                                                      ->31
   18    24  E > > CATCH                                       last         'Exception'
   20    25    >   ECHO                                                     '5+catch%0A'
   21    26        INIT_METHOD_CALL                                         !0, 'getMessage'
         27        DO_FCALL                                      0  $10     
         28        CONCAT                                           ~11     '++', $10
         29        CONCAT                                           ~12     ~11, '%0A'
         30        ECHO                                                     ~12
   22    31      > FAST_CALL                                                ->33
         32    > > JMP                                                      ->35
   23    33    >   ECHO                                                     '6+finally%0A'
         34      > FAST_RET                                                 
   24    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.73 ms | 1449 KiB | 13 Q