3v4l.org

run code in 300+ PHP versions simultaneously
<?php $caught = 0; try { echo 'one'; throw new Exception('-error-'); a: echo 'two'; throw new Exception('-error2-'); } catch (Exception $e) { echo $e->getMessage(); $caught++; if ($caught < 13) { goto a; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MRuBh
function name:  (null)
number of ops:  21
compiled vars:  !0 = $caught, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    4     1        ECHO                                                     'one'
    5     2        NEW                                              $3      'Exception'
          3        SEND_VAL_EX                                              '-error-'
          4        DO_FCALL                                      0          
          5      > THROW                                         0          $3
    6     6    >   ECHO                                                     'two'
    7     7        NEW                                              $5      'Exception'
          8        SEND_VAL_EX                                              '-error2-'
          9        DO_FCALL                                      0          
         10      > THROW                                         0          $5
         11*       JMP                                                      ->20
    8    12  E > > CATCH                                       last         'Exception'
    9    13    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         14        DO_FCALL                                      0  $7      
         15        ECHO                                                     $7
   10    16        PRE_INC                                                  !0
   11    17        IS_SMALLER                                               !0, 13
         18      > JMPZ                                                     ~9, ->20
   12    19    > > JMP                                                      ->6
   14    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.44 ms | 1385 KiB | 13 Q