From: Derick Rethans Date: Sun, 11 Nov 2001 18:28:43 +0000 (+0000) Subject: - Renaming key_exists to array_key_exists X-Git-Tag: ChangeLog~352 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78e4644fa1bdd4214709c3584b776d93a18615fd;p=php - Renaming key_exists to array_key_exists @- Renamed key_exists tp array_key_exists. (Derick) #- Not sure if this belongs in NEWS, but it was already in a released # version. And yes, I know I'm breaking BC here, but as it was not documented # yet, that doesn't matter. --- diff --git a/ext/standard/array.c b/ext/standard/array.c index 4e931c76e7..578f2dd7ac 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -3238,18 +3238,18 @@ PHP_FUNCTION(array_map) /* }}} */ -/* {{{ proto bool key_exists(mixed key, array search) +/* {{{ proto bool array_key_exists(mixed key, array search) Checks if the given key or index exists in the array */ -PHP_FUNCTION(key_exists) +PHP_FUNCTION(array_key_exists) { zval **key, /* key to check for */ **array; /* array to check in */ - + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(ZEND_NUM_ARGS(), &key, &array) == FAILURE) { WRONG_PARAM_COUNT; } - + if (Z_TYPE_PP(array) != IS_ARRAY && Z_TYPE_PP(array) != IS_OBJECT) { php_error(E_WARNING, "Wrong datatype for second argument in call to %s", get_active_function_name(TSRMLS_C)); RETURN_FALSE; @@ -3272,7 +3272,7 @@ PHP_FUNCTION(key_exists) php_error(E_WARNING, "Wrong datatype for first argument in call to %s", get_active_function_name(TSRMLS_C)); RETURN_FALSE; } - + } /* }}} */ diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 94869275c6..c70bff2a2e 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -779,7 +779,7 @@ function_entry basic_functions[] = { PHP_FE(array_filter, NULL) PHP_FE(array_map, NULL) PHP_FE(array_chunk, NULL) - PHP_FE(key_exists, NULL) + PHP_FE(array_key_exists, 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 0292b2416e..73b17bde92 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -79,7 +79,7 @@ PHP_FUNCTION(array_diff); PHP_FUNCTION(array_sum); PHP_FUNCTION(array_filter); PHP_FUNCTION(array_map); -PHP_FUNCTION(key_exists); +PHP_FUNCTION(array_key_exists); PHP_FUNCTION(array_chunk); HashTable* php_splice(HashTable *, int, int, zval ***, int, HashTable **);