3v4l.org

run code in 300+ PHP versions simultaneously
<?php $chance = 20; switch ($chance) { case ($chance < 20): echo 'chance less than 20'; break; case ($chance == 20): echo 'chance equals 20'; break; case ($chance > 20): echo 'chance greater than 20'; 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 = 44) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
filename:       /in/IARoh
function name:  (null)
number of ops:  18
compiled vars:  !0 = $chance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 20
    6     1        IS_SMALLER                                       ~3      !0, 20
          2        IS_EQUAL                                                 !0, ~3
          3      > JMPNZ                                                    ~2, ->11
    9     4    >   IS_EQUAL                                         ~4      !0, 20
          5        IS_EQUAL                                                 !0, ~4
          6      > JMPNZ                                                    ~2, ->13
   12     7    >   IS_SMALLER                                       ~5      20, !0
          8        IS_EQUAL                                                 !0, ~5
          9      > JMPNZ                                                    ~2, ->15
         10    > > JMP                                                      ->17
    7    11    >   ECHO                                                     'chance+less+than+20'
    8    12      > JMP                                                      ->17
   10    13    >   ECHO                                                     'chance+equals+20'
   11    14      > JMP                                                      ->17
   13    15    >   ECHO                                                     'chance+greater+than+20'
   14    16      > JMP                                                      ->17
   15    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.38 ms | 1394 KiB | 13 Q