3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tries = 0; try { a: $tries++; throw new \Exception(sprintf('Tried %d time(s)', $tries)); } catch(\Exception $exception) { echo $exception->getMessage() . "\n"; if($tries > 4) { goto b; } goto a; } b: echo 'Finished\n';
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
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
filename:       /in/BkuaS
function name:  (null)
number of ops:  22
compiled vars:  !0 = $tries, !1 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    5     1    >   PRE_INC                                                  !0
    6     2        NEW                                              $4      'Exception'
          3        INIT_FCALL                                               'sprintf'
          4        SEND_VAL                                                 'Tried+%25d+time%28s%29'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        SEND_VAR_NO_REF_EX                                       $5
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $4
         10*       JMP                                                      ->20
    7    11  E > > CATCH                                       last         'Exception'
    8    12    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         13        DO_FCALL                                      0  $7      
         14        CONCAT                                           ~8      $7, '%0A'
         15        ECHO                                                     ~8
    9    16        IS_SMALLER                                               4, !0
         17      > JMPZ                                                     ~9, ->19
   10    18    > > JMP                                                      ->20
   12    19    > > JMP                                                      ->1
   16    20    >   ECHO                                                     'Finished%5Cn'
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.51 ms | 1395 KiB | 15 Q