3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array('a'); $array2 = array('p1', 'p2', 'p3'); $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 = 6, Position 2 = 16
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dWmhd
function name:  (null)
number of ops:  32
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        COUNT                                            ~4      !1
          3        COUNT                                            ~5      !0
          4        IS_SMALLER                                               ~5, ~4
          5      > JMPZ                                                     ~6, ->16
          6    >   INIT_FCALL                                               'array_fill'
          7        SEND_VAL                                                 0
          8        COUNT                                            ~7      !1
          9        COUNT                                            ~8      !0
         10        SUB                                              ~9      ~7, ~8
         11        SEND_VAL                                                 ~9
         12        SEND_VAL                                                 '%2A'
         13        DO_ICALL                                         $10     
         14        QM_ASSIGN                                        ~11     $10
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~11     <array>
         17    >   ASSIGN_OP                                     1          !0, ~11
    7    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
    8    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
   10    24        INIT_FCALL                                               'print_r'
         25        INIT_FCALL                                               'array_combine'
         26        SEND_VAR                                                 !1
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $15     
         29        SEND_VAR                                                 $15
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.1 ms | 1396 KiB | 19 Q