3v4l.org

run code in 300+ PHP versions simultaneously
<?php $names = array('Bill', 'Ben', 'Bert', 'Ernie'); $start = 2; $value = 'Bill'; //foreach( array_merge( array_slice($names, $start), array_slice( $names, 0, $start)) as $name){ // echo $name; //} switch ($value){ case 'Bill': echo 'Bill'; break; case 'Ernie': echo 'Ernie'; break; default: echo ''; break; }
Finding entry points
Branch analysis from position: 0
4 jumps found. (Code = 188) Position 1 = 9, Position 2 = 11, Position 3 = 13, Position 4 = 4
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 11
Branch analysis from position: 9
filename:       /in/n8uqn
function name:  (null)
number of ops:  16
compiled vars:  !0 = $names, !1 = $start, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 2
    4     2        ASSIGN                                                   !2, 'Bill'
   10     3      > SWITCH_STRING                                            !2, [ 'Bill':->9, 'Ernie':->11, ], ->13
   11     4    >   IS_EQUAL                                                 !2, 'Bill'
          5      > JMPNZ                                                    ~6, ->9
   14     6    >   IS_EQUAL                                                 !2, 'Ernie'
          7      > JMPNZ                                                    ~6, ->11
          8    > > JMP                                                      ->13
   12     9    >   ECHO                                                     'Bill'
   13    10      > JMP                                                      ->15
   15    11    >   ECHO                                                     'Ernie'
   16    12      > JMP                                                      ->15
   18    13    >   ECHO                                                     ''
   19    14      > JMP                                                      ->15
   20    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.22 ms | 1394 KiB | 13 Q