3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array("either","eight","einstein","eighth"); $keys = array_fill(0, count($array), 'name'); $new_array = array_combine($keys, $array); print_r($new_array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U8MVW
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array, !1 = $keys, !2 = $new_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_fill'
          2        SEND_VAL                                                 0
          3        COUNT                                            ~4      !0
          4        SEND_VAL                                                 ~4
          5        SEND_VAL                                                 'name'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    4     8        INIT_FCALL                                               'array_combine'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
    6    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.41 ms | 1386 KiB | 19 Q