sixd Fri May 15 16:46:23 2009 UTC
Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/array array_multisort_variation11.phpt
Modified files:
/php-src/ext/standard array.c
Log:
MFH: New array_multisort() test and code comment fix (Simon Westcott)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.54&r2=1.308.2.21.2.37.2.55&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.54
php-src/ext/standard/array.c:1.308.2.21.2.37.2.55
--- php-src/ext/standard/array.c:1.308.2.21.2.37.2.54 Sun May 10 16:45:21 2009
+++ php-src/ext/standard/array.c Fri May 15 16:46:22 2009
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.308.2.21.2.37.2.54 2009/05/10 16:45:21 colder Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.37.2.55 2009/05/15 16:46:22 sixd Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -3789,7 +3789,7 @@
}
}
- /* If all arrays are empty or have only one entry, we don't need to do
anything. */
+ /* If all arrays are empty we don't need to do anything. */
if (array_size < 1) {
for (k = 0; k < MULTISORT_LAST; k++) {
efree(ARRAYG(multisort_flags)[k]);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_multisort_variation11.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_multisort_variation11.phpt
+++ php-src/ext/standard/tests/array/array_multisort_variation11.phpt
--TEST--
Test array_multisort() function : usage variation - testing with empty array
--FILE--
<?php
/* Prototype : bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [,
SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [,
SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...])
* Description: Sort multiple arrays at once similar to how ORDER BY clause
works in SQL
* Source code: ext/standard/array.c
* Alias to functions:
*/
echo "*** Testing array_multisort() : Testing with empty array ***\n";
var_dump(array_multisort(array()));
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
*** Testing array_multisort() : Testing with empty array ***
bool(true)
===DONE===
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php