3v4l.org

run code in 300+ PHP versions simultaneously
<?php $total = 7; $array = [1, 2]; // Dynamic, will be what you get from db. $array += array_fill(count($array), $total - count($array), 'empty'); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n8Nrr
function name:  (null)
number of ops:  15
compiled vars:  !0 = $total, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 7
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'array_fill'
          3        COUNT                                            ~4      !1
          4        SEND_VAL                                                 ~4
          5        COUNT                                            ~5      !1
          6        SUB                                              ~6      !0, ~5
          7        SEND_VAL                                                 ~6
          8        SEND_VAL                                                 'empty'
          9        DO_ICALL                                         $7      
         10        ASSIGN_OP                                     1          !1, $7
    9    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.37 ms | 939 KiB | 18 Q