3v4l.org

run code in 500+ PHP versions simultaneously
<?php $names = array('Bill', 'Ben', 'Bert', 'Ernie'); $start = 2; foreach( array_merge( array_slice($names, $start), array_slice( $names, 0, $start)) as $name){ echo $name; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/2Jo9f
function name:  (null)
number of ops:  21
compiled vars:  !0 = $names, !1 = $start, !2 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        ASSIGN                                                       !1, 2
    5     2        INIT_FCALL                                                   'array_merge'
          3        INIT_FCALL                                                   'array_slice'
          4        SEND_VAR                                                     !0
          5        SEND_VAR                                                     !1
          6        DO_ICALL                                             $5      
          7        SEND_VAR                                                     $5
          8        INIT_FCALL                                                   'array_slice'
          9        SEND_VAR                                                     !0
         10        SEND_VAL                                                     0
         11        SEND_VAR                                                     !1
         12        DO_ICALL                                             $6      
         13        SEND_VAR                                                     $6
         14        DO_ICALL                                             $7      
         15      > FE_RESET_R                                           $8      $7, ->19
         16    > > FE_FETCH_R                                                   $8, !2, ->19
    6    17    >   ECHO                                                         !2
    5    18      > JMP                                                          ->16
         19    >   FE_FREE                                                      $8
    7    20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.28 ms | 2830 KiB | 15 Q