cvs: php-src /ext/standard/tests/array bug42838.phpt

From: Date: Thu, 14 Feb 2008 13:51:15 +0000
Subject: cvs: php-src /ext/standard/tests/array bug42838.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-48530@lists.php.net to get a copy of this message
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

« previous php.cvs (#48530) next »