3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_1 = array( array('name' => 'Jon', 'user' => 'Apple'), array('name' => 'Dave', 'user' => 'Windows') ); $array_2 = array( array('name' => 'Jon', 'user' => ''), array('name' => 'Jonson', 'user' => ''), array('name' => 'Dave', 'user' => '') ); $array_1 = array_column($array_1, Null, "name"); $array_2 = array_column($array_2, Null, "name"); $result = array_values(array_replace_recursive($array_2, $array_1)); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EcgFh
function name:  (null)
number of ops:  26
compiled vars:  !0 = $array_1, !1 = $array_2, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   13     2        INIT_FCALL                                               'array_column'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 null
          5        SEND_VAL                                                 'name'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !0, $5
   14     8        INIT_FCALL                                               'array_column'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 null
         11        SEND_VAL                                                 'name'
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !1, $7
   17    14        INIT_FCALL                                               'array_values'
         15        INIT_FCALL                                               'array_replace_recursive'
         16        SEND_VAR                                                 !1
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $9      
         19        SEND_VAR                                                 $9
         20        DO_ICALL                                         $10     
         21        ASSIGN                                                   !2, $10
   19    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.76 ms | 1008 KiB | 17 Q