3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.82 ms | 1394 KiB | 13 Q