3v4l.org

run code in 300+ 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 = 20
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/iWPWd
function name:  (null)
number of ops:  22
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, ->20
         16    > > FE_FETCH_R                                               $8, !2, ->20
    6    17    >   CONCAT                                           ~9      !2, '+'
         18        ECHO                                                     ~9
    5    19      > JMP                                                      ->16
         20    >   FE_FREE                                                  $8
    7    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.78 ms | 1395 KiB | 17 Q