3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.63 ms | 1386 KiB | 17 Q