3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 'username' => [ '3805120' => 5, '3805121' => 7, ], 'login' => [ '3805120' => 9, '3805121' => 11, ], ]; $result = array_merge_recursive( array_combine(array_map(function($value) { return 'U'.$value; }, array_keys($data['username'])), $data['username']), array_combine(array_map(function($value) { return 'U'.$value; }, array_keys($data['login'])), $data['login']) ); $result = array_combine( array_map(function($value) { return substr($value, 1); }, array_keys($result)), $result ); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7lGsT
function name:  (null)
number of ops:  51
compiled vars:  !0 = $data, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'array_merge_recursive'
   15     2        INIT_FCALL                                               'array_combine'
          3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F7lGsT%3A15%240'
          5        SEND_VAL                                                 ~3
          6        INIT_FCALL                                               'array_keys'
          7        FETCH_DIM_R                                      ~4      !0, 'username'
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        FETCH_DIM_R                                      ~7      !0, 'username'
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                         $8      
         16        SEND_VAR                                                 $8
   16    17        INIT_FCALL                                               'array_combine'
         18        INIT_FCALL                                               'array_map'
         19        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F7lGsT%3A16%241'
         20        SEND_VAL                                                 ~9
         21        INIT_FCALL                                               'array_keys'
         22        FETCH_DIM_R                                      ~10     !0, 'login'
         23        SEND_VAL                                                 ~10
         24        DO_ICALL                                         $11     
         25        SEND_VAR                                                 $11
         26        DO_ICALL                                         $12     
         27        SEND_VAR                                                 $12
         28        FETCH_DIM_R                                      ~13     !0, 'login'
         29        SEND_VAL                                                 ~13
         30        DO_ICALL                                         $14     
         31        SEND_VAR                                                 $14
         32        DO_ICALL                                         $15     
   14    33        ASSIGN                                                   !1, $15
   18    34        INIT_FCALL                                               'array_combine'
   19    35        INIT_FCALL                                               'array_map'
         36        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F7lGsT%3A19%242'
         37        SEND_VAL                                                 ~17
         38        INIT_FCALL                                               'array_keys'
         39        SEND_VAR                                                 !1
         40        DO_ICALL                                         $18     
         41        SEND_VAR                                                 $18
         42        DO_ICALL                                         $19     
         43        SEND_VAR                                                 $19
   20    44        SEND_VAR                                                 !1
         45        DO_ICALL                                         $20     
   18    46        ASSIGN                                                   !1, $20
   23    47        INIT_FCALL                                               'var_dump'
         48        SEND_VAR                                                 !1
         49        DO_ICALL                                                 
         50      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F7lGsT%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7lGsT
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        CONCAT                                           ~1      'U', !0
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F7lGsT%3A15%240

Function %00%7Bclosure%7D%2Fin%2F7lGsT%3A16%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7lGsT
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        CONCAT                                           ~1      'U', !0
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F7lGsT%3A16%241

Function %00%7Bclosure%7D%2Fin%2F7lGsT%3A19%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7lGsT
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F7lGsT%3A19%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.47 ms | 1400 KiB | 25 Q