mirror of
https://github.com/php/php-src.git
synced 2024-12-25 17:59:52 +08:00
- Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4)
This commit is contained in:
parent
5c09767d4b
commit
5d584d4737
@ -3561,8 +3561,8 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
|
||||
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)))) {
|
||||
|
Loading…
Reference in New Issue
Block a user