3v4l.org

run code in 300+ PHP versions simultaneously
<?php $option = 2; switch($option) { case (int) "2 this is obviously not the right one"; echo "First option chosen"; break; case 2: echo "Second option chosen"; break; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
filename:       /in/olkE9
function name:  (null)
number of ops:  12
compiled vars:  !0 = $option
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2
    6     1        CAST                                          4  ~3      '2+this+is+obviously+not+the+right+one'
          2        IS_EQUAL                                                 !0, ~3
          3      > JMPNZ                                                    ~2, ->7
    9     4    >   IS_EQUAL                                                 !0, 2
          5      > JMPNZ                                                    ~2, ->9
          6    > > JMP                                                      ->11
    7     7    >   ECHO                                                     'First+option+chosen'
    8     8      > JMP                                                      ->11
   10     9    >   ECHO                                                     'Second+option+chosen'
   11    10      > JMP                                                      ->11
   12    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.06 ms | 1393 KiB | 13 Q