cvs: php4 /ext/standard array.c

From: Date: Tue, 20 Feb 2001 16:44:57 +0000
Subject: cvs: php4 /ext/standard array.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4152@lists.php.net to get a copy of this message
jason Tue Feb 20 08:44:57 2001 EDT Modified files: /php4/ext/standard array.c Log: Changed default behavior of array_search to match in_array (strict was default on, and is now default off) Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.93 php4/ext/standard/array.c:1.94 --- php4/ext/standard/array.c:1.93 Tue Feb 20 06:23:03 2001 +++ php4/ext/standard/array.c Tue Feb 20 08:44:57 2001 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.93 2001/02/20 14:23:03 andrei Exp $ */ +/* $Id: array.c,v 1.94 2001/02/20 16:44:57 jason Exp $ */ #include "php.h" #include "php_ini.h" @@ -1051,15 +1051,8 @@ HashPosition pos; /* hash iterator */ ulong num_key; char *string_key; - int (*compare_func)(zval *, zval *, zval *); - - if (behavior == 0) { - compare_func = is_equal_function; - } else { - /* Lets not return a key unless the values are exact */ - compare_func = is_identical_function; - } - + int (*compare_func)(zval *, zval *, zval *) = is_equal_function; + if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 3 || zend_get_parameters_ex(ZEND_NUM_ARGS(), &value, &array, &strict) == FAILURE) { WRONG_PARAM_COUNT; @@ -1079,9 +1072,7 @@ convert_to_boolean_ex(strict); if (Z_LVAL_PP(strict)) { compare_func = is_identical_function; - } else { - compare_func = is_equal_function; - } + } } target_hash = HASH_OF(*array);

« previous php.cvs (#4152) next »