3v4l.org

run code in 300+ PHP versions simultaneously
<?php switch (2) { case 1: echo "we got one"; break; case 2: echo "we got two so we return"; return; break; // not needed but good practice case 3: echo "we got three"; break; // not needed either }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
filename:       /in/gHL73
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   IS_EQUAL                                                 2, 1
          1      > JMPNZ                                                    ~0, ->7
    8     2    >   IS_EQUAL                                                 2, 2
          3      > JMPNZ                                                    ~0, ->9
   13     4    >   IS_EQUAL                                                 2, 3
          5      > JMPNZ                                                    ~0, ->12
          6    > > JMP                                                      ->14
    5     7    >   ECHO                                                     'we+got+one'
    6     8      > JMP                                                      ->14
    9     9    >   ECHO                                                     'we+got+two+so+we+return'
   10    10      > RETURN                                                   null
   11    11*       JMP                                                      ->14
   14    12    >   ECHO                                                     'we+got+three'
   15    13      > JMP                                                      ->14
   16    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.63 ms | 1393 KiB | 13 Q