import zend standard tests
[hiphop-php.git] / hphp / test / zend / good / ext-standard-array / array_intersect_key_error.php
blob3cf881686d69546a4a568a84e47e2682ccda595f
1 <?php
2 /* Prototype : array array_intersect_key(array arr1, array arr2 [, array ...])
3 * Description: Returns the entries of arr1 that have keys which are present in all the other arguments.
4 * Source code: ext/standard/array.c
5 */
7 echo "*** Testing array_intersect_key() : error conditions ***\n";
9 //Initialise function arguments
10 $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
12 // Testing array_intersect_key with one less than the expected number of arguments
13 echo "\n-- Testing array_intersect_key() function with less than expected no. of arguments --\n";
14 var_dump( array_intersect_key($array1) );
16 // Testing array_intersect_key with one less than the expected number of arguments
17 echo "\n-- Testing array_intersect_key() function with no arguments --\n";
18 var_dump( array_intersect_key() );
20 ===DONE===