PHP array_uintersect_assoc() Function

PHP array_uintersect_assoc() Function

The array_uintersect_uassoc() function in PHP calculates the intersection of arrays by comparing the data and indexes by separate callback functions. It returns an array containing all the values of the first input array that are present in all the other given arrays.

Syntax

Parameter

array1(required)– This array represents the first input array.

array2(required)– This array represents the second input array.

array3….(optional)– It represents more arrays to compare against.

value_compare_func(required)– This parameter represents a string that describe a callable comparison function. The comparison function returns an integer greater (<), equal to (=), or less than ( >) than 0 if the first argument is greater(<), equal to(=), or less than( >) than the second argument.

key_compare_func(required)– This parameter represents the key comparison callback function.

Return

This function returns an array containing all the values of the first input array that are present in all the other given arrays.

Example 1

Output

Example 2

Output

Example 3

Output