3v4l.org

run code in 300+ 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                                  '%00%7Bclosure%7D%2Fin%2FIWS6r%3A9%240'
          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                                  '%00%7Bclosure%7D%2Fin%2FIWS6r%3A10%241'
         17        SEND_VAL                                                 ~7
         18        DO_ICALL                                                 
   11    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FIWS6r%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWS6r
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2FIWS6r%3A9%240

Function %00%7Bclosure%7D%2Fin%2FIWS6r%3A10%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWS6r
function name:  {closure}
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                                  '%00%7Bclosure%7D%2Fin%2FIWS6r%3A10%242'
          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

End of function %00%7Bclosure%7D%2Fin%2FIWS6r%3A10%241

Function %00%7Bclosure%7D%2Fin%2FIWS6r%3A10%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWS6r
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2FIWS6r%3A10%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.59 ms | 1405 KiB | 23 Q