From: Stig Venaas Date: Sat, 10 Jun 2000 19:09:56 +0000 (+0000) Subject: Changed array_subtract to array_diff X-Git-Tag: php-4.0.1RC~288 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f18b903d5f0bf7b99a4c387fd5cb2de1787abd3b;p=php Changed array_subtract to array_diff --- diff --git a/ext/standard/array.c b/ext/standard/array.c index a4669e52e6..72462a245c 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2291,10 +2291,10 @@ out: } /* }}} */ -/* {{{ proto array array_subtract(array arr1, array arr2 [, ...]) +/* {{{ proto array array_diff(array arr1, array arr2 [, ...]) Returns the entries of arr1 that have values which are not present in any of the others arguments */ -PHP_FUNCTION(array_subtract) +PHP_FUNCTION(array_diff) { zval ***args = NULL; HashTable *hash; diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 5d4baa16a0..40eb1c2a69 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -509,7 +509,7 @@ function_entry basic_functions[] = { PHP_FE(array_rand, NULL) PHP_FE(array_unique, NULL) PHP_FE(array_intersect, NULL) - PHP_FE(array_subtract, NULL) + PHP_FE(array_diff, NULL) /* aliases from array.c */ PHP_FALIAS(pos, current, first_arg_force_ref) diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index b0d803e9eb..3497b626fa 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -71,7 +71,7 @@ PHP_FUNCTION(array_flip); PHP_FUNCTION(array_rand); PHP_FUNCTION(array_unique); PHP_FUNCTION(array_intersect); -PHP_FUNCTION(array_subtract); +PHP_FUNCTION(array_diff); HashTable* php_splice(HashTable *, int, int, zval ***, int, HashTable **); int multisort_compare(const void *a, const void *b);