summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2001-02-20 14:23:03 +0000
committerAndrei Zmievski <andrei@php.net>2001-02-20 14:23:03 +0000
commit1424e36315c3f4c5dc28a4568ca562b78a3d79eb (patch)
tree08d70db320f583b201d8b16395243a86ca7caf4f /ext/standard/array.c
parent4c04c755ddf913632db77987db9ddbb64fdb9100 (diff)
downloadphp-git-1424e36315c3f4c5dc28a4568ca562b78a3d79eb.tar.gz
Rename to array_search().
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r--ext/standard/array.c9
1 files changed, 4 insertions, 5 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);
}