|
array_udiffComputes the difference of arrays by using a callback function for data comparison Description
array array_udiff
( array
$array1
, array $array2
[, array $...
], callable $value_compare_func
)Computes the difference of arrays by using a callback function for data comparison. This is unlike array_diff which uses an internal function for comparing the data. Parameters
Return Values
Returns an array containing all the values of Examples
Example #1 array_udiff example using stdClass Objects
<?phpThe above example will output:
Array
(
[0] => stdClass Object
(
[width] => 11
[height] => 3
)
[1] => stdClass Object
(
[width] => 7
[height] => 1
)
)
Example #2 array_udiff example using DateTime Objects
<?phpThe above example will output: I'm available on the following days this week... Tuesday Thursday I'm busy on the following days this week... Monday: Cleaning GoogleGuy's apartment. Wednesday: Going on a snowboarding trip. Friday: Fixing buggy code. Notes
See Also
|