summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-02-14 13:50:36 +0000
committerFelipe Pena <felipe@php.net>2008-02-14 13:50:36 +0000
commitfcb243f6e70f8d71c2e32796defca0532d9d21d4 (patch)
tree7d0e4cd0a12b0acf6d26357dc6b0971a32c1f943 /ext
parent2d9d22395f1b26d2408fbf39c5c54e28c8619163 (diff)
downloadphp-git-fcb243f6e70f8d71c2e32796defca0532d9d21d4.tar.gz
New test
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/tests/array/bug42838.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/standard/tests/array/bug42838.phpt b/ext/standard/tests/array/bug42838.phpt
new file mode 100644
index 0000000000..1f895f31e0
--- /dev/null
+++ b/ext/standard/tests/array/bug42838.phpt
@@ -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