summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-02-14 13:51:15 +0000
committerFelipe Pena <felipe@php.net>2008-02-14 13:51:15 +0000
commit3531b3ff5f52a68e5544d93b0573a858f5c484ca (patch)
tree0f5ac9e0a32637cd28ae723f03004459a1e06b7f
parent77d6a5afe8da7aaf1e07b975bb1dd0bd267e0c47 (diff)
downloadphp-git-3531b3ff5f52a68e5544d93b0573a858f5c484ca.tar.gz
New test
-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