import zend standard tests
[hiphop-php.git] / hphp / test / zend / bad / ext-standard-array / array_diff_uassoc_variation14.php
blobf723d99519e21788b11348e8b1c2560b9ba0f552
1 <?php
2 /* Prototype : array array_diff_uassoc(array arr1, array arr2 [, array ...], callback key_comp_func)
3 * Description: Computes the difference of arrays with additional index check which is performed by a
4 * user supplied callback function
5 * Source code: ext/standard/array.c
6 */
8 echo "*** Testing array_diff_uassoc() : usage variation ***\n";
10 //Initialize array
11 $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
12 $array2 = array("a" => "green", "yellow", "red");
14 class classWithoutToString
18 // Define error handler
19 function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
20 if (error_reporting() != 0) {
21 // report non-silenced errors
22 echo "Error: $err_no - $err_msg, $filename($linenum)\n";
25 set_error_handler('test_error_handler');
27 $value = new classWithoutToString();
28 var_dump( array_diff_uassoc($array1, $array2, $value) );
31 ===DONE===