felipe          Thu Feb 14 13:51:15 2008 UTC

  Modified files:              
    /php-src/ext/standard/tests/array   bug42838.phpt 
  Log:
  New test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/bug42838.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/array/bug42838.phpt
diff -u /dev/null php-src/ext/standard/tests/array/bug42838.phpt:1.2
--- /dev/null   Thu Feb 14 13:51:15 2008
+++ php-src/ext/standard/tests/array/bug42838.phpt      Thu Feb 14 13:51:15 2008
@@ -0,0 +1,24 @@
+--TEST--
+Bug#42838 - Wrong results in array_diff_uassoc
+--FILE--
+<?php
+
+function key_compare_func($a, $b)
+{
+       if ($a === $b) {
+               return 0;
+       }
+       return ($a > $b)? 1:-1;
+}
+
+$array1 = array("a" => "green", "b" => "Brown", 'c' => 'blue', 0 => 'red');
+$array2 = array("a" => "green", "b" => "Brown", 'c' => 'blue', 0 => 'red');
+
+$result = array_diff_uassoc($array1, $array2, "key_compare_func");
+print_r($result);
+
+?>
+--EXPECT--
+Array
+(
+)
\ No newline at end of file

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to