3v4l.org

run code in 300+ PHP versions simultaneously
<?php $item = 0; switch($item){ case ($item<=16): var_dump('case 1'); break; case ( ($item>=17) && ($item<=20)): var_dump('case 2'); break; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 8
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
filename:       /in/frN2M
function name:  (null)
number of ops:  20
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    6     1        IS_SMALLER_OR_EQUAL                              ~3      !0, 16
          2        IS_EQUAL                                                 !0, ~3
          3      > JMPNZ                                                    ~2, ->11
    9     4    >   IS_SMALLER_OR_EQUAL                              ~4      17, !0
          5      > JMPZ_EX                                          ~4      ~4, ->8
          6    >   IS_SMALLER_OR_EQUAL                              ~5      !0, 20
          7        BOOL                                             ~4      ~5
          8    >   IS_EQUAL                                                 !0, ~4
          9      > JMPNZ                                                    ~2, ->15
         10    > > JMP                                                      ->19
    7    11    >   INIT_FCALL                                               'var_dump'
         12        SEND_VAL                                                 'case+1'
         13        DO_ICALL                                                 
    8    14      > JMP                                                      ->19
   10    15    >   INIT_FCALL                                               'var_dump'
         16        SEND_VAL                                                 'case+2'
         17        DO_ICALL                                                 
   11    18      > JMP                                                      ->19
   12    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.18 ms | 1395 KiB | 15 Q