3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = array( array('name' => 'asdfjkl;', 'value' => 'foo'), array('name' => 'qwerty', 'value' => 'bar'), array('name' => 'uiop', 'value' => 'baz'), ); $arr2 = array( array('name' => 'zxcv', 'value' => 'stuff'), array('name' => 'asdfjkl;', 'value' => 'foo'), array('name' => '12345', 'value' => 'junk'), array('name' => 'uiop', 'value' => 'baz'), ); $intersect = array_uintersect($arr1, $arr2, 'compareDeepValue'); print_r($intersect); function compareDeepValue($val1, $val2) { return strcmp($val1['value'], $val2['value']); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y74Zg
function name:  (null)
number of ops:  12
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $intersect
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'array_uintersect'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 'compareDeepValue'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
   16     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
   21    11      > RETURN                                                   1

Function comparedeepvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y74Zg
function name:  compareDeepValue
number of ops:  10
compiled vars:  !0 = $val1, !1 = $val2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   20     2        INIT_FCALL                                               'strcmp'
          3        FETCH_DIM_R                                      ~2      !0, 'value'
          4        SEND_VAL                                                 ~2
          5        FETCH_DIM_R                                      ~3      !1, 'value'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8      > RETURN                                                   $4
   21     9*     > RETURN                                                   null

End of function comparedeepvalue

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.11 ms | 1400 KiB | 19 Q