3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'vp 1'=>[5], 'vp 2'=>[10], 'vp 3'=>[15], 'vp 4'=>[20]]; $keys = array_keys($arr); $values = array_merge(array_slice($arr, 1), ["x"]); $new = array_combine($keys, $values); Var_dump($new);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l7NBa
function name:  (null)
number of ops:  23
compiled vars:  !0 = $arr, !1 = $keys, !2 = $values, !3 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   10     5        INIT_FCALL                                               'array_merge'
          6        INIT_FCALL                                               'array_slice'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 1
          9        DO_ICALL                                         $7      
         10        SEND_VAR                                                 $7
         11        SEND_VAL                                                 <array>
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !2, $8
   12    14        INIT_FCALL                                               'array_combine'
         15        SEND_VAR                                                 !1
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !3, $10
   13    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146 ms | 1009 KiB | 18 Q