]> granicus.if.org Git - php/commitdiff
Rename to array_search().
authorAndrei Zmievski <andrei@php.net>
Tue, 20 Feb 2001 14:23:03 +0000 (14:23 +0000)
committerAndrei Zmievski <andrei@php.net>
Tue, 20 Feb 2001 14:23:03 +0000 (14:23 +0000)
ext/standard/array.c
ext/standard/basic_functions.c
ext/standard/php_array.h

index 7544813244cbcc5be85e0e322eb68eb7e2505f6e..7fe829f8e21e30f671a6029013a5fa6ae96bd07a 100644 (file)
@@ -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);
 }
index 55b3c0b99470c89a4e66c184d10b6bba4029159b..ac45428ac4499fa957394dd8694028b9115965a7 100644 (file)
@@ -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)
index 0b2c9dcecc6fa632df284996abda8c6ecdecb7f5..aa75255087b3e014f182d541c8202b9beba5c6b2 100644 (file)
@@ -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);