2 /* Prototype : array array_diff(array $arr1, array $arr2 [, array ...])
3 * Description: Returns the entries of $arr1 that have values which are not
4 * present in any of the others arguments.
5 * Source code: ext/standard/array.c
9 * Test how array_diff() compares indexed arrays containing different
10 * data types as values in place of $arr2
12 <<__EntryPoint
>> function main(): void
{
13 echo "*** Testing array_diff() : usage variations ***\n";
15 // Initialise function arguments not being substituted (if any)
18 //get an unset variable
27 //array of values to iterate over
30 /*1*/"empty array" => array(),
93 // loop through each element of the array for $arr2
95 foreach($values as $value) {
96 echo "\n Iteration: $iterator \n";
97 var_dump( array_diff($array, $value) );