3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('a'=>1,'b'=>2,'c'=>3); $b = array('a'=>'aa','b'=>'bb'); var_dump(array_combine( array_map( function($key) use ($b) { return isset($b[$key]) ? $b[$key] : $key; }, array_keys($a) ), array_values($a) ));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IDBcF
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'array_combine'
    6     4        INIT_FCALL                                               'array_map'
    7     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIDBcF%3A7%240'
          6        BIND_LEXICAL                                             ~4, !1
    9     7        SEND_VAL                                                 ~4
   10     8        INIT_FCALL                                               'array_keys'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
   12    14        INIT_FCALL                                               'array_values'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                         $8      
         19        SEND_VAR                                                 $8
         20        DO_ICALL                                                 
   13    21      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FIDBcF%3A7%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IDBcF
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $key, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    8     2        ISSET_ISEMPTY_DIM_OBJ                         0          !1, !0
          3      > JMPZ                                                     ~2, ->7
          4    >   FETCH_DIM_R                                      ~3      !1, !0
          5        QM_ASSIGN                                        ~4      ~3
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~4      !0
          8    > > RETURN                                                   ~4
    9     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FIDBcF%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.51 ms | 1388 KiB | 23 Q