3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = [ 0 => [7 => 'foo', 13 => 'foo'], 1 => [2 => 'foo', 25 => 'foo'], 4 => [24 => 'foo'], ]; $data = array_combine(array_map(function ($key) { return ++$key; }, array_keys($data)), $data); array_walk($data, function(&$data) { $data = array_combine(array_map(function ($key) { return ++$key; }, array_keys($data)), $data); }); var_dump($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWS6r
function name:  (null)
number of ops:  23
compiled vars:  !0 = $data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    9     1        INIT_FCALL                                                   'array_combine'
          2        INIT_FCALL                                                   'array_map'
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          4        SEND_VAL                                                     ~2
          5        INIT_FCALL                                                   'array_keys'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $3      
          8        SEND_VAR                                                     $3
          9        DO_ICALL                                             $4      
         10        SEND_VAR                                                     $4
         11        SEND_VAR                                                     !0
         12        DO_ICALL                                             $5      
         13        ASSIGN                                                       !0, $5
   10    14        INIT_FCALL                                                   'array_walk'
         15        SEND_REF                                                     !0
         16        DECLARE_LAMBDA_FUNCTION                              ~7      [1]
         17        SEND_VAL                                                     ~7
         18        DO_ICALL                                                     
   11    19        INIT_FCALL                                                   'var_dump'
         20        SEND_VAR                                                     !0
         21        DO_ICALL                                                     
         22      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWS6r
function name:  {closure:/in/IWS6r:9}
number of ops:  4
compiled vars:  !0 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   RECV                                                 !0      
          1        PRE_INC                                              ~1      !0
          2      > RETURN                                                       ~1
          3*     > RETURN                                                       null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWS6r
function name:  {closure:/in/IWS6r:10}
number of ops:  15
compiled vars:  !0 = $data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
          1        INIT_FCALL                                                   'array_combine'
          2        INIT_FCALL                                                   'array_map'
          3        DECLARE_LAMBDA_FUNCTION                              ~1      [0]
          4        SEND_VAL                                                     ~1
          5        INIT_FCALL                                                   'array_keys'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $2      
          8        SEND_VAR                                                     $2
          9        DO_ICALL                                             $3      
         10        SEND_VAR                                                     $3
         11        SEND_VAR                                                     !0
         12        DO_ICALL                                             $4      
         13        ASSIGN                                                       !0, $4
         14      > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWS6r
function name:  {closure:{closure:/in/IWS6r:10}:10}
number of ops:  4
compiled vars:  !0 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
          0  E >   RECV                                                 !0      
          1        PRE_INC                                              ~1      !0
          2      > RETURN                                                       ~1
          3*     > RETURN                                                       null

End of Dynamic Function 0

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
176.88 ms | 2722 KiB | 18 Q