svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/array.c trunk/ext/standard/array.c
| From: | Felipe Pena | Date: | Mon, 01 Nov 2010 17:16:47 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/array.c trunk/ext/standard/array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-63732@lists.php.net to get a copy of this message | ||
felipe Mon, 01 Nov 2010 17:16:47 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=305011
Log:
- Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4)
Bug: http://bugs.php.net/47643 (Assigned) array_diff() takes
over 3000 times longer than php 5.2.4
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/standard/array.c
U php/php-src/trunk/ext/standard/array.c
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2010-11-01 15:09:00 UTC (rev 305010)
+++ php/php-src/branches/PHP_5_3/NEWS 2010-11-01 17:16:47 UTC (rev 305011)
@@ -160,6 +160,8 @@
- Fixed bug #49215 (make fails on glob_wrapper). (Felipe)
- Fixed bug #48831 (php -i has different output to php --ini). (Richard,
Pierre)
+- Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4).
+ (Felipe)
- Fixed bug #45921 (Can't initialize character set hebrew). (Andrey)
- Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy
with SoapClient object). (Dmitry)
Modified: php/php-src/branches/PHP_5_3/ext/standard/array.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/array.c 2010-11-01 15:09:00 UTC (rev 305010)
+++ php/php-src/branches/PHP_5_3/ext/standard/array.c 2010-11-01 17:16:47 UTC (rev 305011)
@@ -3557,8 +3557,8 @@
for (i = 1; i < arr_argc; i++) {
Bucket **ptr = ptrs[i];
if (behavior == DIFF_NORMAL) {
- while (*ptr && (0 < (c = diff_data_compare_func(ptrs[0], ptr TSRMLS_CC)))) {
- ptr++;
+ while (*ptrs[i] && (0 < (c = diff_data_compare_func(ptrs[0], ptrs[i] TSRMLS_CC)))) {
+ ptrs[i]++;
}
} else if (behavior & DIFF_ASSOC) { /* triggered also when DIFF_KEY */
while (*ptr && (0 != (c = diff_key_compare_func(ptrs[0], ptr TSRMLS_CC)))) {
Modified: php/php-src/trunk/ext/standard/array.c
===================================================================
--- php/php-src/trunk/ext/standard/array.c 2010-11-01 15:09:00 UTC (rev 305010)
+++ php/php-src/trunk/ext/standard/array.c 2010-11-01 17:16:47 UTC (rev 305011)
@@ -3561,8 +3561,8 @@
for (i = 1; i < arr_argc; i++) {
Bucket **ptr = ptrs[i];
if (behavior == DIFF_NORMAL) {
- while (*ptr && (0 < (c = diff_data_compare_func(ptrs[0], ptr TSRMLS_CC)))) {
- ptr++;
+ while (*ptrs[i] && (0 < (c = diff_data_compare_func(ptrs[0], ptrs[i] TSRMLS_CC)))) {
+ ptrs[i]++;
}
} else if (behavior & DIFF_ASSOC) { /* triggered also when DIFF_KEY */
while (*ptr && (0 != (c = diff_key_compare_func(ptrs[0], ptr TSRMLS_CC)))) {