3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o"]; for($i = 0; $i < count($myArray); $i += 5) { array_splice($myArray, $i, 0, 1); } print_r($myArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
Branch analysis from position: 3
filename:       /in/5BQbl
function name:  (null)
number of ops:  17
compiled vars:  !0 = $myArray, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->10
    7     3    >   INIT_FCALL                                               'array_splice'
          4        SEND_REF                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 1
          8        DO_ICALL                                                 
    5     9        ASSIGN_OP                                     1          !1, 5
         10    >   COUNT                                            ~6      !0
         11        IS_SMALLER                                               !1, ~6
         12      > JMPNZ                                                    ~7, ->3
    9    13    >   INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.07 ms | 1011 KiB | 15 Q