From 1424e36315c3f4c5dc28a4568ca562b78a3d79eb Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Tue, 20 Feb 2001 14:23:03 +0000 Subject: [PATCH] Rename to array_search(). --- ext/standard/array.c | 9 ++++----- ext/standard/basic_functions.c | 2 +- ext/standard/php_array.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ext/standard/array.c b/ext/standard/array.c index 7544813244..7fe829f8e2 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -1107,12 +1107,11 @@ static void php_search_array(INTERNAL_FUNCTION_PARAMETERS, int behavior) zend_hash_move_forward_ex(target_hash, &pos); } - if (behavior == 0) { - RETURN_FALSE; + if (behavior == 0) { + RETURN_FALSE; } else { return; } - } @@ -1124,9 +1123,9 @@ PHP_FUNCTION(in_array) } /* }}} */ -/* {{{ proto mixed search_array(mixed needle, array haystack [, bool strict]) +/* {{{ proto mixed array_search(mixed needle, array haystack [, bool strict]) Searches the array for a given value and returns the corresponding key if successful */ -PHP_FUNCTION(search_array) +PHP_FUNCTION(array_search) { php_search_array(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 55b3c0b994..ac45428ac4 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -550,7 +550,7 @@ function_entry basic_functions[] = { PHP_FE(min, NULL) PHP_FE(max, NULL) PHP_FE(in_array, NULL) - PHP_FE(search_array, NULL) + PHP_FE(array_search, NULL) PHP_FE(extract, NULL) PHP_FE(compact, NULL) PHP_FE(range, NULL) diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index 0b2c9dcecc..aa75255087 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -49,7 +49,7 @@ PHP_FUNCTION(key); PHP_FUNCTION(min); PHP_FUNCTION(max); PHP_FUNCTION(in_array); -PHP_FUNCTION(search_array); +PHP_FUNCTION(array_search); PHP_FUNCTION(extract); PHP_FUNCTION(compact); PHP_FUNCTION(range); -- 2.40.0