3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array( array('ur_user_id'=> 1,'ur_fname'=>'PerA','ur_lname'=>'SonA'), array('ur_user_id'=> 2,'ur_fname'=>'PerB','ur_lname'=>'SonB'), array('ur_user_id'=> 3,'ur_fname'=>'PerC','ur_lname'=>'SonC'), ); $array2 = array( array('ur_user_id' => 5,'ur_code' => 'EE','ur_user_role' => 'testE'), array('ur_user_id' => 4,'ur_code' => 'DD','ur_user_role' => 'testD'), array('ur_user_id' => 6,'ur_code' => 'FF','ur_user_role' => 'testF'), array('ur_user_id' => 3,'ur_code' => 'CC','ur_user_role' => 'testC'), array('ur_user_id' => 1,'ur_code' => 'AA','ur_user_role' => 'testA'), array('ur_user_id' => 2,'ur_code' => 'BB','ur_user_role' => 'testB'), ); usort($array2,function($a,$b){ return strnatcmp($a['ur_user_id'],$b['ur_user_id']); }); print_r(array_uintersect($array2,$array1,function($a,$b){ return strnatcmp($a['ur_user_id'],$b['ur_user_id']); }));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pqhcD
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array1, !1 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   18     2        INIT_FCALL                                               'usort'
          3        SEND_REF                                                 !1
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FpqhcD%3A18%240'
   20     5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
   21     7        INIT_FCALL                                               'print_r'
          8        INIT_FCALL                                               'array_uintersect'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !0
         11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FpqhcD%3A21%241'
   23    12        SEND_VAL                                                 ~6
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FpqhcD%3A18%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pqhcD
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   19     2        INIT_FCALL                                               'strnatcmp'
          3        FETCH_DIM_R                                      ~2      !0, 'ur_user_id'
          4        SEND_VAL                                                 ~2
          5        FETCH_DIM_R                                      ~3      !1, 'ur_user_id'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8      > RETURN                                                   $4
   20     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FpqhcD%3A18%240

Function %00%7Bclosure%7D%2Fin%2FpqhcD%3A21%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pqhcD
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   22     2        INIT_FCALL                                               'strnatcmp'
          3        FETCH_DIM_R                                      ~2      !0, 'ur_user_id'
          4        SEND_VAL                                                 ~2
          5        FETCH_DIM_R                                      ~3      !1, 'ur_user_id'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8      > RETURN                                                   $4
   23     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FpqhcD%3A21%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
243.64 ms | 1400 KiB | 21 Q