3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 1; switch ($foo) { default: echo 'default'; $foo = 3; case 2: echo '2'; case 3: echo '3'; }
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 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
Branch analysis from position: 8
filename:       /in/2rEKM
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    7     1        IS_EQUAL                                                 !0, 2
          2      > JMPNZ                                                    ~2, ->8
    9     3    >   IS_EQUAL                                                 !0, 3
          4      > JMPNZ                                                    ~2, ->9
          5    > > JMP                                                      ->6
    5     6    >   ECHO                                                     'default'
    6     7        ASSIGN                                                   !0, 3
    8     8    >   ECHO                                                     '2'
   10     9    >   ECHO                                                     '3'
   11    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.17 ms | 1397 KiB | 13 Q