3v4l.org

run code in 500+ PHP versions simultaneously
<?php $my_array = ['a','b','c']; $dyn_array = [1, 2, 3]; $num = 2; $result = array_merge($my_array, ...array_fill(0, $num, $dyn_array)); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/amCJu
function name:  (null)
number of ops:  18
compiled vars:  !0 = $my_array, !1 = $dyn_array, !2 = $num, !3 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        ASSIGN                                                       !1, <array>
    5     2        ASSIGN                                                       !2, 2
    6     3        INIT_FCALL                                                   'array_merge'
          4        SEND_VAR                                                     !0
          5        INIT_FCALL                                                   'array_fill'
          6        SEND_VAL                                                     0
          7        SEND_VAR                                                     !2
          8        SEND_VAR                                                     !1
          9        DO_ICALL                                             $7      
         10        SEND_UNPACK                                                  $7
         11        CHECK_UNDEF_ARGS                                             
         12        DO_ICALL                                             $8      
         13        ASSIGN                                                       !3, $8
    8    14        INIT_FCALL                                                   'print_r'
         15        SEND_VAR                                                     !3
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.09 ms | 2619 KiB | 16 Q