3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array('a'); $array2 = array('p1', 'p2', 'p3'); $array1 = array_merge($array1, count ($array2) > count($array1) ? array_fill(0, count ($array2) - count($array1), '*') : array()); print_r($array1); print_r($array2); print_r(array_combine($array2, $array1));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qYVjP
function name:  (null)
number of ops:  36
compiled vars:  !0 = $array1, !1 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'array_merge'
          3        SEND_VAR                                                 !0
          4        COUNT                                            ~4      !1
          5        COUNT                                            ~5      !0
          6        IS_SMALLER                                               ~5, ~4
          7      > JMPZ                                                     ~6, ->18
          8    >   INIT_FCALL                                               'array_fill'
          9        SEND_VAL                                                 0
         10        COUNT                                            ~7      !1
         11        COUNT                                            ~8      !0
         12        SUB                                              ~9      ~7, ~8
         13        SEND_VAL                                                 ~9
         14        SEND_VAL                                                 '%2A'
         15        DO_ICALL                                         $10     
         16        QM_ASSIGN                                        ~11     $10
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~11     <array>
         19    >   SEND_VAL                                                 ~11
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !0, $12
    7    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                                 
    8    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
   10    28        INIT_FCALL                                               'print_r'
         29        INIT_FCALL                                               'array_combine'
         30        SEND_VAR                                                 !1
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                         $16     
         33        SEND_VAR                                                 $16
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.38 ms | 1396 KiB | 21 Q