3v4l.org

run code in 300+ PHP versions simultaneously
<?php $statusValue = 2; switch ( $statusValue ) { case 0: // fall-through case 2: try { echo 'Trying 2', PHP_EOL; throw new LogicException; } finally { echo 'Executing finally', PHP_EOL; } case 3: echo 'Falling through to 3', PHP_EOL; break; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 8
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
filename:       /in/hYTqu
function name:  (null)
number of ops:  22
compiled vars:  !0 = $statusValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2
    6     1        IS_EQUAL                                                 !0, 0
          2      > JMPNZ                                                    ~2, ->8
    8     3    >   IS_EQUAL                                                 !0, 2
          4      > JMPNZ                                                    ~2, ->8
   15     5    >   IS_EQUAL                                                 !0, 3
          6      > JMPNZ                                                    ~2, ->18
          7    > > JMP                                                      ->21
   10     8    >   ECHO                                                     'Trying+2'
          9        ECHO                                                     '%0A'
   11    10        NEW                                              $4      'LogicException'
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $4
   12    13*       FAST_CALL                                                ->15
         14*       JMP                                                      ->18
   13    15*       ECHO                                                     'Executing+finally'
         16*       ECHO                                                     '%0A'
         17*       FAST_RET                                                 
   16    18    >   ECHO                                                     'Falling+through+to+3'
         19        ECHO                                                     '%0A'
   17    20      > JMP                                                      ->21
   18    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.39 ms | 1398 KiB | 13 Q