Index: Zend/zend_builtin_functions.c =================================================================== RCS file: /repository/ZendEngine2/zend_builtin_functions.c,v retrieving revision 1.277.2.12.2.25.2.17 diff -u -p -d -r1.277.2.12.2.25.2.17 zend_builtin_functions.c --- Zend/zend_builtin_functions.c 27 May 2008 10:29:33 -0000 1.277.2.12.2.25.2.17 +++ Zend/zend_builtin_functions.c 9 Jun 2008 10:42:44 -0000 @@ -94,7 +94,7 @@ static ZEND_FUNCTION(gc_disable); #include "zend_arg_defs.c" -static const zend_function_entry builtin_functions[] = { +static const zend_function_entry builtin_functions[] = { /* {{{ */ ZEND_FE(zend_version, NULL) ZEND_FE(func_num_args, NULL) ZEND_FE(func_get_arg, NULL) @@ -160,13 +160,13 @@ static const zend_function_entry builtin ZEND_FE(gc_disable, NULL) { NULL, NULL, NULL } }; +/* }}} */ - -int zend_startup_builtin_functions(TSRMLS_D) +int zend_startup_builtin_functions(TSRMLS_D) /* {{{ */ { return zend_register_functions(NULL, builtin_functions, NULL, MODULE_PERSISTENT TSRMLS_CC); } - +/* }}} */ /* {{{ proto string zend_version(void) Get the version of the Zend Engine */ @@ -224,7 +224,6 @@ ZEND_FUNCTION(func_num_args) } /* }}} */ - /* {{{ proto mixed func_get_arg(int arg_num) Get the $arg_num'th argument that was passed to the function */ ZEND_FUNCTION(func_get_arg) @@ -267,7 +266,6 @@ ZEND_FUNCTION(func_get_arg) } /* }}} */ - /* {{{ proto array func_get_args() Get an array of the arguments that were passed to the function */ ZEND_FUNCTION(func_get_args) @@ -298,100 +296,90 @@ ZEND_FUNCTION(func_get_args) } /* }}} */ - /* {{{ proto int strlen(string str) Get string length */ ZEND_NAMED_FUNCTION(zend_if_strlen) { - zval **str; + char *str; + int str_len; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) { + return; } - convert_to_string_ex(str); - RETVAL_LONG(Z_STRLEN_PP(str)); + RETURN_LONG(str_len); } /* }}} */ - /* {{{ proto int strcmp(string str1, string str2) Binary safe string comparison */ ZEND_FUNCTION(strcmp) { - zval **s1, **s2; + char *s1, *s2; + int s1_len, s2_len; - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &s1, &s1_len, &s2, &s2_len) == FAILURE) { + return; } - convert_to_string_ex(s1); - convert_to_string_ex(s2); - RETURN_LONG(zend_binary_zval_strcmp(*s1, *s2)); + RETURN_LONG(zend_binary_strcmp(s1, s1_len, s2, s2_len)); } /* }}} */ - /* {{{ proto int strncmp(string str1, string str2, int len) Binary safe string comparison */ ZEND_FUNCTION(strncmp) { - zval **s1, **s2, **s3; - - if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &s1, &s2, &s3) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + char *s1, *s2; + int s1_len, s2_len; + long len; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssl", &s1, &s1_len, &s2, &s2_len, &len) == FAILURE) { + return; } - convert_to_string_ex(s1); - convert_to_string_ex(s2); - convert_to_long_ex(s3); - if (Z_LVAL_PP(s3) < 0) { + if (len < 0) { zend_error(E_WARNING, "Length must be greater than or equal to 0"); RETURN_FALSE; } - RETURN_LONG(zend_binary_zval_strncmp(*s1, *s2, *s3)); + RETURN_LONG(zend_binary_strncmp(s1, s1_len, s2, s2_len, len)); } /* }}} */ - /* {{{ proto int strcasecmp(string str1, string str2) Binary safe case-insensitive string comparison */ ZEND_FUNCTION(strcasecmp) { - zval **s1, **s2; + char *s1, *s2; + int s1_len, s2_len; - if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &s1, &s1_len, &s2, &s2_len) == FAILURE) { + return; } - convert_to_string_ex(s1); - convert_to_string_ex(s2); - RETURN_LONG(zend_binary_zval_strcasecmp(*s1, *s2)); + RETURN_LONG(zend_binary_strcasecmp(s1, s1_len, s2, s2_len)); } /* }}} */ - /* {{{ proto int strncasecmp(string str1, string str2, int len) Binary safe string comparison */ ZEND_FUNCTION(strncasecmp) { - zval **s1, **s2, **s3; + char *s1, *s2; + int s1_len, s2_len; + long len; - if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &s1, &s2, &s3) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssl", &s1, &s1_len, &s2, &s2_len, &len) == FAILURE) { + return; } - convert_to_string_ex(s1); - convert_to_string_ex(s2); - convert_to_long_ex(s3); - if (Z_LVAL_PP(s3) < 0) { + if (len < 0) { zend_error(E_WARNING, "Length must be greater than or equal to 0"); RETURN_FALSE; } - RETURN_LONG(zend_binary_zval_strncasecmp(*s1, *s2, *s3)); + RETURN_LONG(zend_binary_strncasecmp(s1, s1_len, s2, s2_len, len)); } /* }}} */ - /* {{{ proto array each(array arr) Return the currently pointed key..value pair in the passed array, and advance the pointer to the next element */ ZEND_FUNCTION(each) @@ -412,6 +400,7 @@ ZEND_FUNCTION(each) zend_error(E_WARNING,"Variable passed to each() is not an array or object"); return; } + if (zend_hash_get_current_data(target_hash, (void **) &entry_ptr)==FAILURE) { RETURN_FALSE; } @@ -447,7 +436,6 @@ ZEND_FUNCTION(each) } /* }}} */ - /* {{{ proto int error_reporting(int new_error_level=null) Return the current error_reporting level, and if an argument was passed - change to the new level */ ZEND_FUNCTION(error_reporting) @@ -475,7 +463,6 @@ ZEND_FUNCTION(error_reporting) } /* }}} */ - /* {{{ proto bool define(string constant_name, mixed value, boolean case_sensitive=true) Define a new constant */ ZEND_FUNCTION(define) @@ -556,20 +543,19 @@ repeat: } /* }}} */ - /* {{{ proto bool defined(string constant_name) Check whether a constant exists */ ZEND_FUNCTION(defined) { - zval **var; + char *var; + int var_len; zval c; - if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &var)==FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &var, &var_len)==FAILURE) { + return; } - convert_to_string_ex(var); - if (zend_get_constant_ex(Z_STRVAL_PP(var), Z_STRLEN_PP(var), &c, NULL, ZEND_FETCH_CLASS_SILENT TSRMLS_CC)) { + if (zend_get_constant_ex(var, var_len, &c, NULL, ZEND_FETCH_CLASS_SILENT TSRMLS_CC)) { zval_dtor(&c); RETURN_TRUE; } else { @@ -578,7 +564,6 @@ ZEND_FUNCTION(defined) } /* }}} */ - /* {{{ proto string get_class([object object]) Retrieves the class name */ ZEND_FUNCTION(get_class) @@ -609,7 +594,6 @@ ZEND_FUNCTION(get_class) } /* }}} */ - /* {{{ proto string get_called_class() Retrieves the "Late Static Binding" class name */ ZEND_FUNCTION(get_called_class) @@ -628,7 +612,6 @@ ZEND_FUNCTION(get_called_class) } /* }}} */ - /* {{{ proto string get_parent_class([mixed object]) Retrieves the parent class name for object or class or current scope. */ ZEND_FUNCTION(get_parent_class) @@ -673,8 +656,7 @@ ZEND_FUNCTION(get_parent_class) } /* }}} */ - -static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass) +static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass) /* {{{ */ { zval **obj, **class_name; zend_class_entry *instance_ce; @@ -731,7 +713,7 @@ static void is_a_impl(INTERNAL_FUNCTION_ RETURN_BOOL(retval); } - +/* }}} */ /* {{{ proto bool is_subclass_of(object object, string class_name) Returns true if the object has this class as one of its parents */ @@ -741,7 +723,6 @@ ZEND_FUNCTION(is_subclass_of) } /* }}} */ - /* {{{ proto bool is_a(object object, string class_name) Returns true if the object is of this class or has this class as one of its parents */ ZEND_FUNCTION(is_a) @@ -751,7 +732,6 @@ ZEND_FUNCTION(is_a) } /* }}} */ - /* {{{ add_class_vars */ static void add_class_vars(zend_class_entry *ce, HashTable *properties, zval *return_value TSRMLS_DC) { @@ -799,7 +779,6 @@ static void add_class_vars(zend_class_en } /* }}} */ - /* {{{ proto array get_class_vars(string class_name) Returns an array of default properties of the class. */ ZEND_FUNCTION(get_class_vars) @@ -823,12 +802,11 @@ ZEND_FUNCTION(get_class_vars) } /* }}} */ - /* {{{ proto array get_object_vars(object obj) Returns an array of object properties */ ZEND_FUNCTION(get_object_vars) { - zval **obj; + zval *obj; zval **value; HashTable *properties; HashPosition pos; @@ -837,24 +815,21 @@ ZEND_FUNCTION(get_object_vars) ulong num_index; zend_object *zobj; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &obj) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) { + return; } - if (Z_TYPE_PP(obj) != IS_OBJECT) { - RETURN_FALSE; - } - if (Z_OBJ_HT_PP(obj)->get_properties == NULL) { + if (Z_OBJ_HT_P(obj)->get_properties == NULL) { RETURN_FALSE; } - properties = Z_OBJ_HT_PP(obj)->get_properties(*obj TSRMLS_CC); + properties = Z_OBJ_HT_P(obj)->get_properties(obj TSRMLS_CC); if (properties == NULL) { RETURN_FALSE; } - zobj = zend_objects_get_address(*obj TSRMLS_CC); + zobj = zend_objects_get_address(obj TSRMLS_CC); array_init(return_value); @@ -874,7 +849,6 @@ ZEND_FUNCTION(get_object_vars) } /* }}} */ - /* {{{ proto array get_class_methods(mixed class) Returns an array of method names for class or class instance. */ ZEND_FUNCTION(get_class_methods) @@ -936,7 +910,6 @@ ZEND_FUNCTION(get_class_methods) } /* }}} */ - /* {{{ proto bool method_exists(object object, string method) Checks if the class method exists */ ZEND_FUNCTION(method_exists) @@ -1050,7 +1023,6 @@ ZEND_FUNCTION(property_exists) } /* }}} */ - /* {{{ proto bool class_exists(string classname [, bool autoload]) Checks if the class exists */ ZEND_FUNCTION(class_exists) @@ -1115,23 +1087,22 @@ ZEND_FUNCTION(interface_exists) } /* }}} */ - /* {{{ proto bool function_exists(string function_name) Checks if the function exists */ ZEND_FUNCTION(function_exists) { - zval **function_name; + char *function_name; + int function_name_len; zend_function *func; char *lcname; zend_bool retval; - if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &function_name)==FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &function_name, &function_name_len)==FAILURE) { + return; } - convert_to_string_ex(function_name); - lcname = zend_str_tolower_dup(Z_STRVAL_PP(function_name), Z_STRLEN_PP(function_name)); + lcname = zend_str_tolower_dup(function_name, function_name_len); - retval = (zend_hash_find(EG(function_table), lcname, Z_STRLEN_PP(function_name)+1, (void **)&func) == SUCCESS); + retval = (zend_hash_find(EG(function_table), lcname, function_name_len+1, (void **)&func) == SUCCESS); efree(lcname); @@ -1210,14 +1181,14 @@ ZEND_FUNCTION(leak) } /* }}} */ - #ifdef ZEND_TEST_EXCEPTIONS -ZEND_FUNCTION(crash) +ZEND_FUNCTION(crash) /* {{{ */ { char *nowhere=NULL; memcpy(nowhere, "something", sizeof("something")); } +/* }}} */ #endif #endif /* ZEND_DEBUG */ @@ -1240,47 +1211,33 @@ ZEND_FUNCTION(get_included_files) } /* }}} */ - /* {{{ proto void trigger_error(string messsage [, int error_type]) Generates a user-level error/warning/notice message */ ZEND_FUNCTION(trigger_error) { - int error_type = E_USER_NOTICE; - zval **z_error_type, **z_error_message; + long error_type = E_USER_NOTICE; + char *error_message; + int error_message_len; - switch (ZEND_NUM_ARGS()) { - case 1: - if (zend_get_parameters_ex(1, &z_error_message)==FAILURE) { - ZEND_WRONG_PARAM_COUNT(); - } - break; - case 2: - if (zend_get_parameters_ex(2, &z_error_message, &z_error_type)==FAILURE) { - ZEND_WRONG_PARAM_COUNT(); - } - convert_to_long_ex(z_error_type); - error_type = Z_LVAL_PP(z_error_type); - switch (error_type) { - case E_USER_ERROR: - case E_USER_WARNING: - case E_USER_NOTICE: - break; - default: - zend_error(E_WARNING, "Invalid error type specified"); - RETURN_FALSE; - break; - } + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &error_message, &error_message_len, &error_type) == FAILURE) { + return; + } + + switch ((int)error_type) { + case E_USER_ERROR: + case E_USER_WARNING: + case E_USER_NOTICE: break; default: - ZEND_WRONG_PARAM_COUNT(); + zend_error(E_WARNING, "Invalid error type specified"); + RETURN_FALSE; + break; } - convert_to_string_ex(z_error_message); - zend_error(error_type, "%s", Z_STRVAL_PP(z_error_message)); + zend_error((int)error_type, "%s", error_message); RETURN_TRUE; } /* }}} */ - /* {{{ proto string set_error_handler(string error_handler [, int error_types]) Sets a user-defined error handler function. Returns the previously defined error handler, or false on error */ ZEND_FUNCTION(set_error_handler) @@ -1329,7 +1286,6 @@ ZEND_FUNCTION(set_error_handler) } /* }}} */ - /* {{{ proto void restore_error_handler(void) Restores the previously defined error handler function */ ZEND_FUNCTION(restore_error_handler) @@ -1352,7 +1308,6 @@ ZEND_FUNCTION(restore_error_handler) } /* }}} */ - /* {{{ proto string set_exception_handler(callable exception_handler) Sets a user-defined exception handler function. Returns the previously defined exception handler, or false on error */ ZEND_FUNCTION(set_exception_handler) @@ -1398,7 +1353,6 @@ ZEND_FUNCTION(set_exception_handler) } /* }}} */ - /* {{{ proto void restore_exception_handler(void) Restores the previously defined exception handler function */ ZEND_FUNCTION(restore_exception_handler) @@ -1415,8 +1369,7 @@ ZEND_FUNCTION(restore_exception_handler) } /* }}} */ - -static int copy_class_or_interface_name(zend_class_entry **pce, int num_args, va_list args, zend_hash_key *hash_key) +static int copy_class_or_interface_name(zend_class_entry **pce, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { zval *array = va_arg(args, zval *); zend_uint mask = va_arg(args, zend_uint); @@ -1430,7 +1383,7 @@ static int copy_class_or_interface_name( } return ZEND_HASH_APPLY_KEEP; } - +/* }}} */ /* {{{ proto array get_declared_classes() Returns an array of all declared classes. */ @@ -1464,8 +1417,7 @@ ZEND_FUNCTION(get_declared_interfaces) } /* }}} */ - -static int copy_function_name(zend_function *func, int num_args, va_list args, zend_hash_key *hash_key) +static int copy_function_name(zend_function *func, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { zval *internal_ar = va_arg(args, zval *), *user_ar = va_arg(args, zval *); @@ -1482,7 +1434,7 @@ static int copy_function_name(zend_funct return 0; } - +/* }}} */ /* {{{ proto array get_defined_functions(void) Returns an array of all defined functions */ @@ -1521,7 +1473,6 @@ ZEND_FUNCTION(get_defined_functions) } /* }}} */ - /* {{{ proto array get_defined_vars(void) Returns an associative array of names and values of all currently defined variable names (variables in the current scope) */ ZEND_FUNCTION(get_defined_vars) @@ -1537,7 +1488,6 @@ ZEND_FUNCTION(get_defined_vars) } /* }}} */ - #define LAMBDA_TEMP_FUNCNAME "__lambda_func" /* {{{ proto string create_function(string args, string code) Creates an anonymous function, and returns its name (funny, eh?) */ @@ -1545,24 +1495,22 @@ ZEND_FUNCTION(create_function) { char *eval_code, *function_name; int eval_code_length, function_name_length; - zval **z_function_args, **z_function_code; + char *function_args, *function_code; + int function_args_len, function_code_len; int retval; char *eval_name; - if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &z_function_args, &z_function_code)==FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &function_args, &function_args_len, &function_code, &function_code_len) == FAILURE) { + return; } - convert_to_string_ex(z_function_args); - convert_to_string_ex(z_function_code); - eval_code_length = sizeof("function " LAMBDA_TEMP_FUNCNAME) - +Z_STRLEN_PP(z_function_args) + +function_args_len +2 /* for the args parentheses */ +2 /* for the curly braces */ - +Z_STRLEN_PP(z_function_code); + +function_code_len; - zend_spprintf(&eval_code, 0, "function " LAMBDA_TEMP_FUNCNAME "(%s){%s}", Z_STRVAL_PP(z_function_args), Z_STRVAL_PP(z_function_code)); + zend_spprintf(&eval_code, 0, "function " LAMBDA_TEMP_FUNCNAME "(%s){%s}", function_args, function_code); eval_name = zend_make_compiled_string_description("runtime-created function" TSRMLS_CC); retval = zend_eval_string(eval_code, NULL, eval_name TSRMLS_CC); @@ -1593,21 +1541,21 @@ ZEND_FUNCTION(create_function) } /* }}} */ - #if ZEND_DEBUG -ZEND_FUNCTION(zend_test_func) +ZEND_FUNCTION(zend_test_func) /* {{{ */ { zval *arg1, *arg2; zend_get_parameters(ht, 2, &arg1, &arg2); } - +/* }}} */ #ifdef ZTS -ZEND_FUNCTION(zend_thread_id) +ZEND_FUNCTION(zend_thread_id) /* {{{ */ { RETURN_LONG(tsrm_thread_id()); } +/* }}} */ #endif #endif @@ -1616,18 +1564,13 @@ ZEND_FUNCTION(zend_thread_id) ZEND_FUNCTION(get_resource_type) { char *resource_type; - zval **z_resource_type; - - if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &z_resource_type)==FAILURE) { - ZEND_WRONG_PARAM_COUNT(); - } + zval *resource; - if (Z_TYPE_PP(z_resource_type) != IS_RESOURCE) { - zend_error(E_WARNING, "Supplied argument is not a valid resource handle"); - RETURN_FALSE; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &resource) == FAILURE) { + return; } - resource_type = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(z_resource_type) TSRMLS_CC); + resource_type = zend_rsrc_list_get_rsrc_type(Z_LVAL_P(resource) TSRMLS_CC); if (resource_type) { RETURN_STRING(resource_type, 1); } else { @@ -1636,22 +1579,23 @@ ZEND_FUNCTION(get_resource_type) } /* }}} */ - -static int add_extension_info(zend_module_entry *module, void *arg TSRMLS_DC) +static int add_extension_info(zend_module_entry *module, void *arg TSRMLS_DC) /* {{{ */ { zval *name_array = (zval *)arg; add_next_index_string(name_array, module->name, 1); return 0; } +/* }}} */ -static int add_zendext_info(zend_extension *ext, void *arg TSRMLS_DC) +static int add_zendext_info(zend_extension *ext, void *arg TSRMLS_DC) /* {{{ */ { zval *name_array = (zval *)arg; add_next_index_string(name_array, ext->name, 1); return 0; } +/* }}} */ -static int add_constant_info(zend_constant *constant, void *arg TSRMLS_DC) +static int add_constant_info(zend_constant *constant, void *arg TSRMLS_DC) /* {{{ */ { zval *name_array = (zval *)arg; zval *const_val; @@ -1663,7 +1607,7 @@ static int add_constant_info(zend_consta add_assoc_zval_ex(name_array, constant->name, constant->name_len, const_val); return 0; } - +/* }}} */ /* {{{ proto array get_loaded_extensions([bool zend_extensions]) U Return an array containing names of loaded extensions */ @@ -1685,7 +1629,6 @@ ZEND_FUNCTION(get_loaded_extensions) } /* }}} */ - /* {{{ proto array get_defined_constants([mixed categorize]) Return an array containing the names and values of all defined constants */ ZEND_FUNCTION(get_defined_constants) @@ -1754,8 +1697,7 @@ bad_module_id: } /* }}} */ - -static zval *debug_backtrace_get_args(void **curpos TSRMLS_DC) +static zval *debug_backtrace_get_args(void **curpos TSRMLS_DC) /* {{{ */ { void **p = curpos; zval *arg_array, **arg; @@ -1780,8 +1722,9 @@ static zval *debug_backtrace_get_args(vo return arg_array; } +/* }}} */ -void debug_print_backtrace_args(zval *arg_array TSRMLS_DC) +void debug_print_backtrace_args(zval *arg_array TSRMLS_DC) /* {{{ */ { zval **tmp; HashPosition iterator; @@ -1796,6 +1739,7 @@ void debug_print_backtrace_args(zval *ar zend_hash_move_forward_ex(arg_array->value.ht, &iterator); } } +/* }}} */ /* {{{ proto void debug_print_backtrace(void) */ ZEND_FUNCTION(debug_print_backtrace) @@ -1956,7 +1900,7 @@ ZEND_FUNCTION(debug_print_backtrace) /* }}} */ -ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int provide_object TSRMLS_DC) +ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int provide_object TSRMLS_DC) /* {{{ */ { zend_execute_data *ptr, *skip; int lineno; @@ -2114,7 +2058,6 @@ ZEND_API void zend_fetch_debug_backtrace } /* }}} */ - /* {{{ proto array debug_backtrace([bool provide_object]) Return backtrace as array */ ZEND_FUNCTION(debug_backtrace) @@ -2133,16 +2076,15 @@ ZEND_FUNCTION(debug_backtrace) Returns true if the named extension is loaded */ ZEND_FUNCTION(extension_loaded) { - zval **extension_name; - char *lcname; + char *extension_name, *lcname; + int extension_name_len; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &extension_name)) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &extension_name, &extension_name_len)) { + return; } - convert_to_string_ex(extension_name); - lcname = zend_str_tolower_dup(Z_STRVAL_PP(extension_name), Z_STRLEN_PP(extension_name)); - if (zend_hash_exists(&module_registry, lcname, Z_STRLEN_PP(extension_name)+1)) { + lcname = zend_str_tolower_dup(extension_name, extension_name_len); + if (zend_hash_exists(&module_registry, lcname, extension_name_len+1)) { RETVAL_TRUE; } else { RETVAL_FALSE; @@ -2151,24 +2093,22 @@ ZEND_FUNCTION(extension_loaded) } /* }}} */ - /* {{{ proto array get_extension_funcs(string extension_name) Returns an array with the names of functions belonging to the named extension */ ZEND_FUNCTION(get_extension_funcs) { - zval **extension_name; + char *extension_name; + int extension_name_len; zend_module_entry *module; const zend_function_entry *func; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &extension_name)) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &extension_name, &extension_name_len)) { + return; } - convert_to_string_ex(extension_name); - if (strncasecmp(Z_STRVAL_PP(extension_name), "zend", sizeof("zend"))) { - char *lcname = zend_str_tolower_dup(Z_STRVAL_PP(extension_name), Z_STRLEN_PP(extension_name)); - if (zend_hash_find(&module_registry, lcname, - Z_STRLEN_PP(extension_name)+1, (void**)&module) == FAILURE) { + if (strncasecmp(extension_name, "zend", sizeof("zend"))) { + char *lcname = zend_str_tolower_dup(extension_name, extension_name_len); + if (zend_hash_find(&module_registry, lcname, extension_name_len+1, (void**)&module) == FAILURE) { efree(lcname); RETURN_FALSE; } Index: Zend/tests/004.phpt =================================================================== RCS file: /repository/ZendEngine2/tests/004.phpt,v retrieving revision 1.1.2.2 diff -u -p -d -r1.1.2.2 004.phpt --- Zend/tests/004.phpt 27 Jun 2006 21:10:03 -0000 1.1.2.2 +++ Zend/tests/004.phpt 9 Jun 2008 10:42:44 -0000 @@ -13,7 +13,7 @@ var_dump(strncmp("qwerty", "qwerty123", echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for strncmp() in %s on line %d +Warning: strncmp() expects exactly 3 parameters, 2 given in %s on line %d NULL int(0) Index: Zend/tests/005.phpt =================================================================== RCS file: /repository/ZendEngine2/tests/005.phpt,v retrieving revision 1.1.2.2 diff -u -p -d -r1.1.2.2 005.phpt --- Zend/tests/005.phpt 27 Jun 2006 21:10:03 -0000 1.1.2.2 +++ Zend/tests/005.phpt 9 Jun 2008 10:42:44 -0000 @@ -15,7 +15,7 @@ var_dump(strcasecmp("01", "01")); echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for strcasecmp() in %s on line %d +Warning: strcasecmp() expects exactly 2 parameters, 1 given in %s on line %d NULL int(0) int(-3) Index: Zend/tests/006.phpt =================================================================== RCS file: /repository/ZendEngine2/tests/006.phpt,v retrieving revision 1.1.2.2 diff -u -p -d -r1.1.2.2 006.phpt --- Zend/tests/006.phpt 27 Jun 2006 21:10:03 -0000 1.1.2.2 +++ Zend/tests/006.phpt 9 Jun 2008 10:42:44 -0000 @@ -16,7 +16,7 @@ var_dump(strncasecmp("01", "01", 1000)); echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for strncasecmp() in %s on line %d +Warning: strncasecmp() expects exactly 3 parameters, 1 given in %s on line %d NULL Warning: Length must be greater than or equal to 0 in %s on line %d Index: Zend/tests/015.phpt =================================================================== RCS file: /repository/ZendEngine2/tests/015.phpt,v retrieving revision 1.1.2.2 diff -u -p -d -r1.1.2.2 015.phpt --- Zend/tests/015.phpt 27 Jun 2006 21:10:04 -0000 1.1.2.2 +++ Zend/tests/015.phpt 9 Jun 2008 10:42:44 -0000 @@ -13,16 +13,14 @@ var_dump(trigger_error("error", E_USER_W echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for trigger_error() in %s on line %d +Warning: trigger_error() expects at least 1 parameter, 0 given in %s on line %d NULL Notice: error in %s on line %d bool(true) -Notice: Array to string conversion in %s on line %d - -Notice: Array in %s on line %d -bool(true) +Warning: trigger_error() expects parameter 1 to be string, array given in %s on line %d +NULL Warning: Invalid error type specified in %s on line %d bool(false) Index: Zend/tests/017.phpt =================================================================== RCS file: /repository/ZendEngine2/tests/017.phpt,v retrieving revision 1.1.2.6.2.1 diff -u -p -d -r1.1.2.6.2.1 017.phpt --- Zend/tests/017.phpt 10 Mar 2008 22:17:59 -0000 1.1.2.6.2.1 +++ Zend/tests/017.phpt 9 Jun 2008 10:42:44 -0000 @@ -45,11 +45,11 @@ var_dump(count(get_extension_funcs("zend echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for get_resource_type() in %s on line %d +Warning: get_resource_type() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Supplied argument is not a valid resource handle in %s on line %d -bool(false) +Warning: get_resource_type() expects parameter 1 to be resource, string given in %s on line %d +NULL string(6) "stream" string(7) "Unknown" string(5) "array" @@ -76,7 +76,7 @@ NULL string(5) "array" int(%d) -Warning: Wrong parameter count for get_extension_funcs() in %s on line %d +Warning: get_extension_funcs() expects exactly 1 parameter, 0 given in %s on line %d NULL bool(false) string(5) "array" Index: Zend/tests/each_002.phpt =================================================================== RCS file: /repository/ZendEngine2/tests/each_002.phpt,v retrieving revision 1.1.2.2 diff -u -p -d -r1.1.2.2 each_002.phpt --- Zend/tests/each_002.phpt 12 May 2008 17:57:21 -0000 1.1.2.2 +++ Zend/tests/each_002.phpt 9 Jun 2008 10:42:44 -0000 @@ -28,18 +28,3 @@ array(4) { ["key"]=> int(0) } ---UEXPECTF-- -bool(false) -bool(false) -array(4) { - [1]=> - object(stdClass)#1 (0) { - } - [u"value"]=> - object(stdClass)#1 (0) { - } - [0]=> - int(0) - [u"key"]=> - int(0) -} Index: ext/standard/string.c =================================================================== RCS file: /repository/php-src/ext/standard/string.c,v retrieving revision 1.445.2.14.2.69.2.22 diff -u -p -d -r1.445.2.14.2.69.2.22 string.c --- ext/standard/string.c 27 May 2008 10:29:33 -0000 1.445.2.14.2.69.2.22 +++ ext/standard/string.c 9 Jun 2008 10:42:45 -0000 @@ -1014,10 +1014,13 @@ PHP_FUNCTION(explode) if (argc < 2 || argc > 3 || zend_get_parameters_ex(argc, &delim, &str, &zlimit) == FAILURE) { WRONG_PARAM_COUNT; } + SEPARATE_ZVAL(str); convert_to_string_ex(str); + SEPARATE_ZVAL(delim); convert_to_string_ex(delim); if (argc > 2) { + SEPARATE_ZVAL(zlimit); convert_to_long_ex(zlimit); limit = Z_LVAL_PP(zlimit); } @@ -1163,10 +1166,12 @@ PHP_FUNCTION(implode) } else { if (Z_TYPE_PP(arg1) == IS_ARRAY) { arr = *arg1; + SEPARATE_ZVAL(arg2); convert_to_string_ex(arg2); delim = *arg2; } else if (Z_TYPE_PP(arg2) == IS_ARRAY) { arr = *arg2; + SEPARATE_ZVAL(arg1); convert_to_string_ex(arg1); delim = *arg1; } else { @@ -1710,9 +1715,11 @@ PHP_FUNCTION(strpos) if (argc < 2 || argc > 3 || zend_get_parameters_ex(argc, &haystack, &needle, &z_offset) == FAILURE) { WRONG_PARAM_COUNT; } + SEPARATE_ZVAL(haystack); convert_to_string_ex(haystack); if (argc > 2) { + SEPARATE_ZVAL(z_offset); convert_to_long_ex(z_offset); offset = Z_LVAL_PP(z_offset); } @@ -1733,6 +1740,7 @@ PHP_FUNCTION(strpos) Z_STRLEN_PP(needle), Z_STRVAL_PP(haystack) + Z_STRLEN_PP(haystack)); } else { + SEPARATE_ZVAL(needle); convert_to_long_ex(needle); needle_char[0] = (char) Z_LVAL_PP(needle); needle_char[1] = 0; @@ -2096,15 +2104,18 @@ PHP_FUNCTION(chunk_split) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|ZZ", &p_str, &p_chunklen, &p_ending) == FAILURE) { return; } - + + SEPARATE_ZVAL(p_str); convert_to_string_ex(p_str); if (argc > 1) { + SEPARATE_ZVAL(p_chunklen); convert_to_long_ex(p_chunklen); chunklen = Z_LVAL_PP(p_chunklen); } if (argc > 2) { + SEPARATE_ZVAL(p_ending); convert_to_string_ex(p_ending); end = Z_STRVAL_PP(p_ending); endlen = Z_STRLEN_PP(p_ending); @@ -2152,10 +2163,13 @@ PHP_FUNCTION(substr) WRONG_PARAM_COUNT; } + SEPARATE_ZVAL(str); convert_to_string_ex(str); + SEPARATE_ZVAL(from); convert_to_long_ex(from); if (argc > 2) { + SEPARATE_ZVAL(len); convert_to_long_ex(len); l = Z_LVAL_PP(len); if ((l < 0 && -l > Z_STRLEN_PP(str))) { @@ -2233,12 +2247,15 @@ PHP_FUNCTION(substr_replace) } if (Z_TYPE_PP(str) != IS_ARRAY) { + SEPARATE_ZVAL(str); convert_to_string_ex(str); } if (Z_TYPE_PP(repl) != IS_ARRAY) { + SEPARATE_ZVAL(repl); convert_to_string_ex(repl); } if (Z_TYPE_PP(from) != IS_ARRAY) { + SEPARATE_ZVAL(from); convert_to_long_ex(from); } @@ -2766,6 +2783,7 @@ PHP_FUNCTION(strtr) RETURN_FALSE; } + SEPARATE_ZVAL(str); convert_to_string_ex(str); /* shortcut for empty string */ @@ -2776,7 +2794,9 @@ PHP_FUNCTION(strtr) if (ac == 2) { php_strtr_array(return_value, Z_STRVAL_PP(str), Z_STRLEN_PP(str), HASH_OF(*from)); } else { + SEPARATE_ZVAL(from); convert_to_string_ex(from); + SEPARATE_ZVAL(to); convert_to_string_ex(to); ZVAL_STRINGL(return_value, Z_STRVAL_PP(str), Z_STRLEN_PP(str), 1); @@ -2877,10 +2897,13 @@ PHP_FUNCTION(similar_text) WRONG_PARAM_COUNT; } + SEPARATE_ZVAL(t1); convert_to_string_ex(t1); + SEPARATE_ZVAL(t2); convert_to_string_ex(t2); if (ac > 2) { + SEPARATE_ZVAL(percent); convert_to_double_ex(percent); } @@ -4526,7 +4549,9 @@ PHP_FUNCTION(str_repeat) } /* Make sure we're dealing with proper types */ + SEPARATE_ZVAL(input_str); convert_to_string_ex(input_str); + SEPARATE_ZVAL(mult); convert_to_long_ex(mult); if (Z_LVAL_PP(mult) < 0) { @@ -4587,9 +4612,11 @@ PHP_FUNCTION(count_chars) WRONG_PARAM_COUNT; } + SEPARATE_ZVAL(input); convert_to_string_ex(input); if (ac == 2) { + SEPARATE_ZVAL(mode); convert_to_long_ex(mode); mymode = Z_LVAL_PP(mode); @@ -4781,7 +4808,9 @@ PHP_FUNCTION(substr_count) WRONG_PARAM_COUNT; } + SEPARATE_ZVAL(haystack); convert_to_string_ex(haystack); + SEPARATE_ZVAL(needle); convert_to_string_ex(needle); if (Z_STRLEN_PP(needle) == 0) { @@ -4793,6 +4822,7 @@ PHP_FUNCTION(substr_count) endp = p + Z_STRLEN_PP(haystack); if (ac > 2) { + SEPARATE_ZVAL(offset); convert_to_long_ex(offset); if (Z_LVAL_PP(offset) < 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset should be greater than or equal to 0"); @@ -4806,6 +4836,7 @@ PHP_FUNCTION(substr_count) p += Z_LVAL_PP(offset); if (ac == 4) { + SEPARATE_ZVAL(length); convert_to_long_ex(length); if (Z_LVAL_PP(length) <= 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length should be greater than 0"); @@ -4863,7 +4894,9 @@ PHP_FUNCTION(str_pad) } /* Perform initial conversion to expected data types. */ + SEPARATE_ZVAL(input); convert_to_string_ex(input); + SEPARATE_ZVAL(pad_length); convert_to_long_ex(pad_length); num_pad_chars = Z_LVAL_PP(pad_length) - Z_STRLEN_PP(input); @@ -4876,6 +4909,7 @@ PHP_FUNCTION(str_pad) /* Setup the padding string values if specified. */ if (ZEND_NUM_ARGS() > 2) { + SEPARATE_ZVAL(pad_string); convert_to_string_ex(pad_string); if (Z_STRLEN_PP(pad_string) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Padding string cannot be empty"); @@ -4885,6 +4919,7 @@ PHP_FUNCTION(str_pad) pad_str_len = Z_STRLEN_PP(pad_string); if (ZEND_NUM_ARGS() > 3) { + SEPARATE_ZVAL(pad_type); convert_to_long_ex(pad_type); pad_type_val = Z_LVAL_PP(pad_type); if (pad_type_val < STR_PAD_LEFT || pad_type_val > STR_PAD_BOTH) { Index: ext/standard/tests/class_object/get_object_vars_error_001.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/class_object/get_object_vars_error_001.phpt,v retrieving revision 1.1.4.2 diff -u -p -d -r1.1.4.2 get_object_vars_error_001.phpt --- ext/standard/tests/class_object/get_object_vars_error_001.phpt 6 Mar 2008 11:02:37 -0000 1.1.4.2 +++ ext/standard/tests/class_object/get_object_vars_error_001.phpt 9 Jun 2008 10:42:45 -0000 @@ -27,11 +27,11 @@ echo "Done"; -- Testing get_object_vars() function with Zero arguments -- -Warning: Wrong parameter count for get_object_vars() in %s on line 12 +Warning: get_object_vars() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing get_object_vars() function with more than expected no. of arguments -- -Warning: Wrong parameter count for get_object_vars() in %s on line 18 +Warning: get_object_vars() expects exactly 1 parameter, 2 given in %s on line %d NULL -Done \ No newline at end of file +Done Index: ext/standard/tests/class_object/get_object_vars_variation_003.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/class_object/get_object_vars_variation_003.phpt,v retrieving revision 1.1.4.2 diff -u -p -d -r1.1.4.2 get_object_vars_variation_003.phpt --- ext/standard/tests/class_object/get_object_vars_variation_003.phpt 6 Mar 2008 11:02:37 -0000 1.1.4.2 +++ ext/standard/tests/class_object/get_object_vars_variation_003.phpt 9 Jun 2008 10:42:45 -0000 @@ -74,85 +74,137 @@ echo "Done"; --EXPECTF-- *** Testing get_object_vars() : usage variations *** -Notice: Undefined variable: undefined_var in %s on line 56 +Notice: Undefined variable: undefined_var in %s on line %d -Notice: Undefined variable: unset_var in %s on line 59 +Notice: Undefined variable: unset_var in %s on line %d Arg value 0 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, integer given in %s on line %d +NULL Arg value 1 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, integer given in %s on line %d +NULL Arg value 12345 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, integer given in %s on line %d +NULL Arg value -2345 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, integer given in %s on line %d +NULL Arg value 10.5 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, double given in %s on line %d +NULL Arg value -10.5 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, double given in %s on line %d +NULL Arg value 101234567000 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, double given in %s on line %d +NULL Arg value 1.07654321E-9 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, double given in %s on line %d +NULL Arg value 0.5 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, double given in %s on line %d +NULL Arg value Array -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d +NULL Arg value Array -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d +NULL Arg value Array -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d +NULL Arg value Array -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d +NULL Arg value Array -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d +NULL Arg value -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d +NULL Arg value -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d +NULL Arg value 1 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, boolean given in %s on line %d +NULL Arg value -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, boolean given in %s on line %d +NULL Arg value 1 -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, boolean given in %s on line %d +NULL Arg value -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, boolean given in %s on line %d +NULL Arg value -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d +NULL Arg value -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d +NULL Arg value string -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d +NULL Arg value string -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d +NULL Arg value -bool(false) + +Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d +NULL Arg value -bool(false) -Done \ No newline at end of file + +Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d +NULL +Done Index: ext/standard/tests/general_functions/bug41970.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/general_functions/bug41970.phpt,v retrieving revision 1.1.2.3 diff -u -p -d -r1.1.2.3 bug41970.phpt --- ext/standard/tests/general_functions/bug41970.phpt 10 Jan 2008 09:38:23 -0000 1.1.2.3 +++ ext/standard/tests/general_functions/bug41970.phpt 9 Jun 2008 10:42:45 -0000 @@ -13,15 +13,15 @@ var_dump(call_user_func("strlen", $a)); echo "Done\n"; ?> --EXPECTF-- -Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line 5 +Warning: Parameter 1 to sort() expected to be a reference, value given in %s on line %d NULL -Notice: Array to string conversion in %sbug41970.php on line 6 -int(5) +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d +NULL -Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line 7 +Warning: Parameter 1 to sort() expected to be a reference, value given in %s on line %d NULL -Notice: Array to string conversion in %sbug41970.php on line 8 -int(5) +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d +NULL Done Index: ext/standard/tests/strings/strcasecmp.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strcasecmp.phpt,v retrieving revision 1.3.2.3 diff -u -p -d -r1.3.2.3 strcasecmp.phpt --- ext/standard/tests/strings/strcasecmp.phpt 1 May 2007 00:05:39 -0000 1.3.2.3 +++ ext/standard/tests/strings/strcasecmp.phpt 9 Jun 2008 10:42:45 -0000 @@ -161,36 +161,36 @@ Array Iteration 0 - strcasecmp of 'a' and 'a' is => int(0) - strcasecmp of 'a' and 'A' is => int(0) -- strcasecmp of 'a' and '€' is => int(-%d) -- strcasecmp of 'a' and 'ÿ' is => int(-%d) -- strcasecmp of 'a' and '' is => int(%d) +- strcasecmp of 'a' and '€' is => int(-31) +- strcasecmp of 'a' and 'ÿ' is => int(-158) +- strcasecmp of 'a' and '' is => int(97) Iteration 1 - strcasecmp of 'A' and 'a' is => int(0) - strcasecmp of 'A' and 'A' is => int(0) -- strcasecmp of 'A' and '€' is => int(-%d) -- strcasecmp of 'A' and 'ÿ' is => int(-%d) -- strcasecmp of 'A' and '' is => int(%d) +- strcasecmp of 'A' and '€' is => int(-31) +- strcasecmp of 'A' and 'ÿ' is => int(-158) +- strcasecmp of 'A' and '' is => int(97) Iteration 2 -- strcasecmp of '€' and 'a' is => int(%d) -- strcasecmp of '€' and 'A' is => int(%d) +- strcasecmp of '€' and 'a' is => int(31) +- strcasecmp of '€' and 'A' is => int(31) - strcasecmp of '€' and '€' is => int(0) -- strcasecmp of '€' and 'ÿ' is => int(-%d) -- strcasecmp of '€' and '' is => int(%d) +- strcasecmp of '€' and 'ÿ' is => int(-127) +- strcasecmp of '€' and '' is => int(128) Iteration 3 -- strcasecmp of 'ÿ' and 'a' is => int(%d) -- strcasecmp of 'ÿ' and 'A' is => int(%d) -- strcasecmp of 'ÿ' and '€' is => int(%d) +- strcasecmp of 'ÿ' and 'a' is => int(158) +- strcasecmp of 'ÿ' and 'A' is => int(158) +- strcasecmp of 'ÿ' and '€' is => int(127) - strcasecmp of 'ÿ' and 'ÿ' is => int(0) -- strcasecmp of 'ÿ' and '' is => int(%d) +- strcasecmp of 'ÿ' and '' is => int(255) Iteration 4 -- strcasecmp of '' and 'a' is => int(-%d) -- strcasecmp of '' and 'A' is => int(-%d) -- strcasecmp of '' and '€' is => int(-%d) -- strcasecmp of '' and 'ÿ' is => int(-%d) +- strcasecmp of '' and 'a' is => int(-97) +- strcasecmp of '' and 'A' is => int(-97) +- strcasecmp of '' and '€' is => int(-128) +- strcasecmp of '' and 'ÿ' is => int(-255) - strcasecmp of '' and '' is => int(0) *** comparing the strings in an @@ -210,100 +210,100 @@ Array Iteration 0 - strcasecmp of 'acc' and 'acc' is => int(0) - strcasecmp of 'acc' and 'Acc' is => int(0) -- strcasecmp of 'acc' and 'aC' is => int(%d) -- strcasecmp of 'acc' and 'acCc' is => int(-%d) -- strcasecmp of 'acc' and 'acd' is => int(-%d) -- strcasecmp of 'acc' and '?acc' is => int(%d) -- strcasecmp of 'acc' and 'Acc!' is => int(-%d) -- strcasecmp of 'acc' and '$!acc' is => int(%d) -- strcasecmp of 'acc' and ';acc' is => int(%d) +- strcasecmp of 'acc' and 'aC' is => int(1) +- strcasecmp of 'acc' and 'acCc' is => int(-1) +- strcasecmp of 'acc' and 'acd' is => int(-1) +- strcasecmp of 'acc' and '?acc' is => int(34) +- strcasecmp of 'acc' and 'Acc!' is => int(-1) +- strcasecmp of 'acc' and '$!acc' is => int(61) +- strcasecmp of 'acc' and ';acc' is => int(38) Iteration 1 - strcasecmp of 'Acc' and 'acc' is => int(0) - strcasecmp of 'Acc' and 'Acc' is => int(0) -- strcasecmp of 'Acc' and 'aC' is => int(%d) -- strcasecmp of 'Acc' and 'acCc' is => int(-%d) -- strcasecmp of 'Acc' and 'acd' is => int(-%d) -- strcasecmp of 'Acc' and '?acc' is => int(%d) -- strcasecmp of 'Acc' and 'Acc!' is => int(-%d) -- strcasecmp of 'Acc' and '$!acc' is => int(%d) -- strcasecmp of 'Acc' and ';acc' is => int(%d) +- strcasecmp of 'Acc' and 'aC' is => int(1) +- strcasecmp of 'Acc' and 'acCc' is => int(-1) +- strcasecmp of 'Acc' and 'acd' is => int(-1) +- strcasecmp of 'Acc' and '?acc' is => int(34) +- strcasecmp of 'Acc' and 'Acc!' is => int(-1) +- strcasecmp of 'Acc' and '$!acc' is => int(61) +- strcasecmp of 'Acc' and ';acc' is => int(38) Iteration 2 -- strcasecmp of 'aC' and 'acc' is => int(-%d) -- strcasecmp of 'aC' and 'Acc' is => int(-%d) +- strcasecmp of 'aC' and 'acc' is => int(-1) +- strcasecmp of 'aC' and 'Acc' is => int(-1) - strcasecmp of 'aC' and 'aC' is => int(0) -- strcasecmp of 'aC' and 'acCc' is => int(-%d) -- strcasecmp of 'aC' and 'acd' is => int(-%d) -- strcasecmp of 'aC' and '?acc' is => int(%d) -- strcasecmp of 'aC' and 'Acc!' is => int(-%d) -- strcasecmp of 'aC' and '$!acc' is => int(%d) -- strcasecmp of 'aC' and ';acc' is => int(%d) +- strcasecmp of 'aC' and 'acCc' is => int(-2) +- strcasecmp of 'aC' and 'acd' is => int(-1) +- strcasecmp of 'aC' and '?acc' is => int(34) +- strcasecmp of 'aC' and 'Acc!' is => int(-2) +- strcasecmp of 'aC' and '$!acc' is => int(61) +- strcasecmp of 'aC' and ';acc' is => int(38) Iteration 3 -- strcasecmp of 'acCc' and 'acc' is => int(%d) -- strcasecmp of 'acCc' and 'Acc' is => int(%d) -- strcasecmp of 'acCc' and 'aC' is => int(%d) +- strcasecmp of 'acCc' and 'acc' is => int(1) +- strcasecmp of 'acCc' and 'Acc' is => int(1) +- strcasecmp of 'acCc' and 'aC' is => int(2) - strcasecmp of 'acCc' and 'acCc' is => int(0) -- strcasecmp of 'acCc' and 'acd' is => int(-%d) -- strcasecmp of 'acCc' and '?acc' is => int(%d) -- strcasecmp of 'acCc' and 'Acc!' is => int(%d) -- strcasecmp of 'acCc' and '$!acc' is => int(%d) -- strcasecmp of 'acCc' and ';acc' is => int(%d) +- strcasecmp of 'acCc' and 'acd' is => int(-1) +- strcasecmp of 'acCc' and '?acc' is => int(34) +- strcasecmp of 'acCc' and 'Acc!' is => int(66) +- strcasecmp of 'acCc' and '$!acc' is => int(61) +- strcasecmp of 'acCc' and ';acc' is => int(38) Iteration 4 -- strcasecmp of 'acd' and 'acc' is => int(%d) -- strcasecmp of 'acd' and 'Acc' is => int(%d) -- strcasecmp of 'acd' and 'aC' is => int(%d) -- strcasecmp of 'acd' and 'acCc' is => int(%d) +- strcasecmp of 'acd' and 'acc' is => int(1) +- strcasecmp of 'acd' and 'Acc' is => int(1) +- strcasecmp of 'acd' and 'aC' is => int(1) +- strcasecmp of 'acd' and 'acCc' is => int(1) - strcasecmp of 'acd' and 'acd' is => int(0) -- strcasecmp of 'acd' and '?acc' is => int(%d) -- strcasecmp of 'acd' and 'Acc!' is => int(%d) -- strcasecmp of 'acd' and '$!acc' is => int(%d) -- strcasecmp of 'acd' and ';acc' is => int(%d) +- strcasecmp of 'acd' and '?acc' is => int(34) +- strcasecmp of 'acd' and 'Acc!' is => int(1) +- strcasecmp of 'acd' and '$!acc' is => int(61) +- strcasecmp of 'acd' and ';acc' is => int(38) Iteration 5 -- strcasecmp of '?acc' and 'acc' is => int(-%d) -- strcasecmp of '?acc' and 'Acc' is => int(-%d) -- strcasecmp of '?acc' and 'aC' is => int(-%d) -- strcasecmp of '?acc' and 'acCc' is => int(-%d) -- strcasecmp of '?acc' and 'acd' is => int(-%d) +- strcasecmp of '?acc' and 'acc' is => int(-34) +- strcasecmp of '?acc' and 'Acc' is => int(-34) +- strcasecmp of '?acc' and 'aC' is => int(-34) +- strcasecmp of '?acc' and 'acCc' is => int(-34) +- strcasecmp of '?acc' and 'acd' is => int(-34) - strcasecmp of '?acc' and '?acc' is => int(0) -- strcasecmp of '?acc' and 'Acc!' is => int(-%d) -- strcasecmp of '?acc' and '$!acc' is => int(%d) -- strcasecmp of '?acc' and ';acc' is => int(%d) +- strcasecmp of '?acc' and 'Acc!' is => int(-34) +- strcasecmp of '?acc' and '$!acc' is => int(27) +- strcasecmp of '?acc' and ';acc' is => int(4) Iteration 6 -- strcasecmp of 'Acc!' and 'acc' is => int(%d) -- strcasecmp of 'Acc!' and 'Acc' is => int(%d) -- strcasecmp of 'Acc!' and 'aC' is => int(%d) -- strcasecmp of 'Acc!' and 'acCc' is => int(-%d) -- strcasecmp of 'Acc!' and 'acd' is => int(-%d) -- strcasecmp of 'Acc!' and '?acc' is => int(%d) +- strcasecmp of 'Acc!' and 'acc' is => int(1) +- strcasecmp of 'Acc!' and 'Acc' is => int(1) +- strcasecmp of 'Acc!' and 'aC' is => int(2) +- strcasecmp of 'Acc!' and 'acCc' is => int(-66) +- strcasecmp of 'Acc!' and 'acd' is => int(-1) +- strcasecmp of 'Acc!' and '?acc' is => int(34) - strcasecmp of 'Acc!' and 'Acc!' is => int(0) -- strcasecmp of 'Acc!' and '$!acc' is => int(%d) -- strcasecmp of 'Acc!' and ';acc' is => int(%d) +- strcasecmp of 'Acc!' and '$!acc' is => int(61) +- strcasecmp of 'Acc!' and ';acc' is => int(38) Iteration 7 -- strcasecmp of '$!acc' and 'acc' is => int(-%d) -- strcasecmp of '$!acc' and 'Acc' is => int(-%d) -- strcasecmp of '$!acc' and 'aC' is => int(-%d) -- strcasecmp of '$!acc' and 'acCc' is => int(-%d) -- strcasecmp of '$!acc' and 'acd' is => int(-%d) -- strcasecmp of '$!acc' and '?acc' is => int(-%d) -- strcasecmp of '$!acc' and 'Acc!' is => int(-%d) +- strcasecmp of '$!acc' and 'acc' is => int(-61) +- strcasecmp of '$!acc' and 'Acc' is => int(-61) +- strcasecmp of '$!acc' and 'aC' is => int(-61) +- strcasecmp of '$!acc' and 'acCc' is => int(-61) +- strcasecmp of '$!acc' and 'acd' is => int(-61) +- strcasecmp of '$!acc' and '?acc' is => int(-27) +- strcasecmp of '$!acc' and 'Acc!' is => int(-61) - strcasecmp of '$!acc' and '$!acc' is => int(0) -- strcasecmp of '$!acc' and ';acc' is => int(-%d) +- strcasecmp of '$!acc' and ';acc' is => int(-23) Iteration 8 -- strcasecmp of ';acc' and 'acc' is => int(-%d) -- strcasecmp of ';acc' and 'Acc' is => int(-%d) -- strcasecmp of ';acc' and 'aC' is => int(-%d) -- strcasecmp of ';acc' and 'acCc' is => int(-%d) -- strcasecmp of ';acc' and 'acd' is => int(-%d) -- strcasecmp of ';acc' and '?acc' is => int(-%d) -- strcasecmp of ';acc' and 'Acc!' is => int(-%d) -- strcasecmp of ';acc' and '$!acc' is => int(%d) +- strcasecmp of ';acc' and 'acc' is => int(-38) +- strcasecmp of ';acc' and 'Acc' is => int(-38) +- strcasecmp of ';acc' and 'aC' is => int(-38) +- strcasecmp of ';acc' and 'acCc' is => int(-38) +- strcasecmp of ';acc' and 'acd' is => int(-38) +- strcasecmp of ';acc' and '?acc' is => int(-4) +- strcasecmp of ';acc' and 'Acc!' is => int(-38) +- strcasecmp of ';acc' and '$!acc' is => int(23) - strcasecmp of ';acc' and ';acc' is => int(0) *** comparing the strings in an @@ -325,170 +325,170 @@ Array Iteration 0 - strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) +- strcasecmp of '1' and '0' is => int(1) +- strcasecmp of '1' and '0' is => int(1) +- strcasecmp of '1' and '-1' is => int(4) +- strcasecmp of '1' and '-1' is => int(4) +- strcasecmp of '1' and '' is => int(1) +- strcasecmp of '1' and '' is => int(1) +- strcasecmp of '1' and '' is => int(1) - strcasecmp of '1' and '1' is => int(0) - strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and 'string' is => int(-%d) +- strcasecmp of '1' and '' is => int(1) +- strcasecmp of '1' and 'string' is => int(-66) Iteration 1 -- strcasecmp of '0' and '1' is => int(-%d) +- strcasecmp of '0' and '1' is => int(-1) - strcasecmp of '0' and '0' is => int(0) - strcasecmp of '0' and '0' is => int(0) -- strcasecmp of '0' and '-1' is => int(%d) -- strcasecmp of '0' and '-1' is => int(%d) -- strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and 'string' is => int(-%d) +- strcasecmp of '0' and '-1' is => int(3) +- strcasecmp of '0' and '-1' is => int(3) +- strcasecmp of '0' and '' is => int(1) +- strcasecmp of '0' and '' is => int(1) +- strcasecmp of '0' and '' is => int(1) +- strcasecmp of '0' and '1' is => int(-1) +- strcasecmp of '0' and '1' is => int(-1) +- strcasecmp of '0' and '' is => int(1) +- strcasecmp of '0' and 'string' is => int(-67) Iteration 2 -- strcasecmp of '0' and '1' is => int(-%d) +- strcasecmp of '0' and '1' is => int(-1) - strcasecmp of '0' and '0' is => int(0) - strcasecmp of '0' and '0' is => int(0) -- strcasecmp of '0' and '-1' is => int(%d) -- strcasecmp of '0' and '-1' is => int(%d) -- strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and 'string' is => int(-%d) +- strcasecmp of '0' and '-1' is => int(3) +- strcasecmp of '0' and '-1' is => int(3) +- strcasecmp of '0' and '' is => int(1) +- strcasecmp of '0' and '' is => int(1) +- strcasecmp of '0' and '' is => int(1) +- strcasecmp of '0' and '1' is => int(-1) +- strcasecmp of '0' and '1' is => int(-1) +- strcasecmp of '0' and '' is => int(1) +- strcasecmp of '0' and 'string' is => int(-67) Iteration 3 -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '0' is => int(-%d) -- strcasecmp of '-1' and '0' is => int(-%d) +- strcasecmp of '-1' and '1' is => int(-4) +- strcasecmp of '-1' and '0' is => int(-3) +- strcasecmp of '-1' and '0' is => int(-3) - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '-1' is => int(0) -- strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and 'string' is => int(-%d) +- strcasecmp of '-1' and '' is => int(2) +- strcasecmp of '-1' and '' is => int(2) +- strcasecmp of '-1' and '' is => int(2) +- strcasecmp of '-1' and '1' is => int(-4) +- strcasecmp of '-1' and '1' is => int(-4) +- strcasecmp of '-1' and '' is => int(2) +- strcasecmp of '-1' and 'string' is => int(-70) Iteration 4 -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '0' is => int(-%d) -- strcasecmp of '-1' and '0' is => int(-%d) +- strcasecmp of '-1' and '1' is => int(-4) +- strcasecmp of '-1' and '0' is => int(-3) +- strcasecmp of '-1' and '0' is => int(-3) - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '-1' is => int(0) -- strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and 'string' is => int(-%d) +- strcasecmp of '-1' and '' is => int(2) +- strcasecmp of '-1' and '' is => int(2) +- strcasecmp of '-1' and '' is => int(2) +- strcasecmp of '-1' and '1' is => int(-4) +- strcasecmp of '-1' and '1' is => int(-4) +- strcasecmp of '-1' and '' is => int(2) +- strcasecmp of '-1' and 'string' is => int(-70) Iteration 5 -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) +- strcasecmp of '' and '1' is => int(-1) +- strcasecmp of '' and '0' is => int(-1) +- strcasecmp of '' and '0' is => int(-1) +- strcasecmp of '' and '-1' is => int(-2) +- strcasecmp of '' and '-1' is => int(-2) - strcasecmp of '' and '' is => int(0) - strcasecmp of '' and '' is => int(0) - strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '1' is => int(-%d) +- strcasecmp of '' and '1' is => int(-1) +- strcasecmp of '' and '1' is => int(-1) - strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and 'string' is => int(-%d) +- strcasecmp of '' and 'string' is => int(-6) Iteration 6 -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) +- strcasecmp of '' and '1' is => int(-1) +- strcasecmp of '' and '0' is => int(-1) +- strcasecmp of '' and '0' is => int(-1) +- strcasecmp of '' and '-1' is => int(-2) +- strcasecmp of '' and '-1' is => int(-2) - strcasecmp of '' and '' is => int(0) - strcasecmp of '' and '' is => int(0) - strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '1' is => int(-%d) +- strcasecmp of '' and '1' is => int(-1) +- strcasecmp of '' and '1' is => int(-1) - strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and 'string' is => int(-%d) +- strcasecmp of '' and 'string' is => int(-6) Iteration 7 -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) +- strcasecmp of '' and '1' is => int(-1) +- strcasecmp of '' and '0' is => int(-1) +- strcasecmp of '' and '0' is => int(-1) +- strcasecmp of '' and '-1' is => int(-2) +- strcasecmp of '' and '-1' is => int(-2) - strcasecmp of '' and '' is => int(0) - strcasecmp of '' and '' is => int(0) - strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '1' is => int(-%d) +- strcasecmp of '' and '1' is => int(-1) +- strcasecmp of '' and '1' is => int(-1) - strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and 'string' is => int(-%d) +- strcasecmp of '' and 'string' is => int(-6) Iteration 8 - strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) +- strcasecmp of '1' and '0' is => int(1) +- strcasecmp of '1' and '0' is => int(1) +- strcasecmp of '1' and '-1' is => int(4) +- strcasecmp of '1' and '-1' is => int(4) +- strcasecmp of '1' and '' is => int(1) +- strcasecmp of '1' and '' is => int(1) +- strcasecmp of '1' and '' is => int(1) - strcasecmp of '1' and '1' is => int(0) - strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and 'string' is => int(-%d) +- strcasecmp of '1' and '' is => int(1) +- strcasecmp of '1' and 'string' is => int(-66) Iteration 9 - strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) +- strcasecmp of '1' and '0' is => int(1) +- strcasecmp of '1' and '0' is => int(1) +- strcasecmp of '1' and '-1' is => int(4) +- strcasecmp of '1' and '-1' is => int(4) +- strcasecmp of '1' and '' is => int(1) +- strcasecmp of '1' and '' is => int(1) +- strcasecmp of '1' and '' is => int(1) - strcasecmp of '1' and '1' is => int(0) - strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and 'string' is => int(-%d) +- strcasecmp of '1' and '' is => int(1) +- strcasecmp of '1' and 'string' is => int(-66) Iteration 10 -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) +- strcasecmp of '' and '1' is => int(-1) +- strcasecmp of '' and '0' is => int(-1) +- strcasecmp of '' and '0' is => int(-1) +- strcasecmp of '' and '-1' is => int(-2) +- strcasecmp of '' and '-1' is => int(-2) - strcasecmp of '' and '' is => int(0) - strcasecmp of '' and '' is => int(0) - strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '1' is => int(-%d) +- strcasecmp of '' and '1' is => int(-1) +- strcasecmp of '' and '1' is => int(-1) - strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and 'string' is => int(-%d) +- strcasecmp of '' and 'string' is => int(-6) Iteration 11 -- strcasecmp of 'string' and '1' is => int(%d) -- strcasecmp of 'string' and '0' is => int(%d) -- strcasecmp of 'string' and '0' is => int(%d) -- strcasecmp of 'string' and '-1' is => int(%d) -- strcasecmp of 'string' and '-1' is => int(%d) -- strcasecmp of 'string' and '' is => int(%d) -- strcasecmp of 'string' and '' is => int(%d) -- strcasecmp of 'string' and '' is => int(%d) -- strcasecmp of 'string' and '1' is => int(%d) -- strcasecmp of 'string' and '1' is => int(%d) -- strcasecmp of 'string' and '' is => int(%d) +- strcasecmp of 'string' and '1' is => int(66) +- strcasecmp of 'string' and '0' is => int(67) +- strcasecmp of 'string' and '0' is => int(67) +- strcasecmp of 'string' and '-1' is => int(70) +- strcasecmp of 'string' and '-1' is => int(70) +- strcasecmp of 'string' and '' is => int(6) +- strcasecmp of 'string' and '' is => int(6) +- strcasecmp of 'string' and '' is => int(6) +- strcasecmp of 'string' and '1' is => int(66) +- strcasecmp of 'string' and '1' is => int(66) +- strcasecmp of 'string' and '' is => int(6) - strcasecmp of 'string' and 'string' is => int(0) *** comparing the strings in an @@ -507,157 +507,157 @@ Array Iteration 0 - strcasecmp of '10.5' and '10.5' is => int(0) -- strcasecmp of '10.5' and '1.5' is => int(%d) -- strcasecmp of '10.5' and '9.5' is => int(-%d) -- strcasecmp of '10.5' and '11.5' is => int(-%d) -- strcasecmp of '10.5' and '100.5' is => int(-%d) -- strcasecmp of '10.5' and '105' is => int(-%d) -- strcasecmp of '10.5' and '-10.5' is => int(%d) -- strcasecmp of '10.5' and '10' is => int(%d) -- strcasecmp of '10.5' and '0.5' is => int(%d) +- strcasecmp of '10.5' and '1.5' is => int(2) +- strcasecmp of '10.5' and '9.5' is => int(-8) +- strcasecmp of '10.5' and '11.5' is => int(-1) +- strcasecmp of '10.5' and '100.5' is => int(-2) +- strcasecmp of '10.5' and '105' is => int(-7) +- strcasecmp of '10.5' and '-10.5' is => int(4) +- strcasecmp of '10.5' and '10' is => int(2) +- strcasecmp of '10.5' and '0.5' is => int(1) Iteration 1 -- strcasecmp of '1.5' and '10.5' is => int(-%d) +- strcasecmp of '1.5' and '10.5' is => int(-2) - strcasecmp of '1.5' and '1.5' is => int(0) -- strcasecmp of '1.5' and '9.5' is => int(-%d) -- strcasecmp of '1.5' and '11.5' is => int(-%d) -- strcasecmp of '1.5' and '100.5' is => int(-%d) -- strcasecmp of '1.5' and '105' is => int(-%d) -- strcasecmp of '1.5' and '-10.5' is => int(%d) -- strcasecmp of '1.5' and '10' is => int(-%d) -- strcasecmp of '1.5' and '0.5' is => int(%d) +- strcasecmp of '1.5' and '9.5' is => int(-8) +- strcasecmp of '1.5' and '11.5' is => int(-3) +- strcasecmp of '1.5' and '100.5' is => int(-2) +- strcasecmp of '1.5' and '105' is => int(-2) +- strcasecmp of '1.5' and '-10.5' is => int(4) +- strcasecmp of '1.5' and '10' is => int(-2) +- strcasecmp of '1.5' and '0.5' is => int(1) Iteration 2 -- strcasecmp of '9.5' and '10.5' is => int(%d) -- strcasecmp of '9.5' and '1.5' is => int(%d) +- strcasecmp of '9.5' and '10.5' is => int(8) +- strcasecmp of '9.5' and '1.5' is => int(8) - strcasecmp of '9.5' and '9.5' is => int(0) -- strcasecmp of '9.5' and '11.5' is => int(%d) -- strcasecmp of '9.5' and '100.5' is => int(%d) -- strcasecmp of '9.5' and '105' is => int(%d) -- strcasecmp of '9.5' and '-10.5' is => int(%d) -- strcasecmp of '9.5' and '10' is => int(%d) -- strcasecmp of '9.5' and '0.5' is => int(%d) +- strcasecmp of '9.5' and '11.5' is => int(8) +- strcasecmp of '9.5' and '100.5' is => int(8) +- strcasecmp of '9.5' and '105' is => int(8) +- strcasecmp of '9.5' and '-10.5' is => int(12) +- strcasecmp of '9.5' and '10' is => int(8) +- strcasecmp of '9.5' and '0.5' is => int(9) Iteration 3 -- strcasecmp of '11.5' and '10.5' is => int(%d) -- strcasecmp of '11.5' and '1.5' is => int(%d) -- strcasecmp of '11.5' and '9.5' is => int(-%d) +- strcasecmp of '11.5' and '10.5' is => int(1) +- strcasecmp of '11.5' and '1.5' is => int(3) +- strcasecmp of '11.5' and '9.5' is => int(-8) - strcasecmp of '11.5' and '11.5' is => int(0) -- strcasecmp of '11.5' and '100.5' is => int(%d) -- strcasecmp of '11.5' and '105' is => int(%d) -- strcasecmp of '11.5' and '-10.5' is => int(%d) -- strcasecmp of '11.5' and '10' is => int(%d) -- strcasecmp of '11.5' and '0.5' is => int(%d) +- strcasecmp of '11.5' and '100.5' is => int(1) +- strcasecmp of '11.5' and '105' is => int(1) +- strcasecmp of '11.5' and '-10.5' is => int(4) +- strcasecmp of '11.5' and '10' is => int(1) +- strcasecmp of '11.5' and '0.5' is => int(1) Iteration 4 -- strcasecmp of '100.5' and '10.5' is => int(%d) -- strcasecmp of '100.5' and '1.5' is => int(%d) -- strcasecmp of '100.5' and '9.5' is => int(-%d) -- strcasecmp of '100.5' and '11.5' is => int(-%d) +- strcasecmp of '100.5' and '10.5' is => int(2) +- strcasecmp of '100.5' and '1.5' is => int(2) +- strcasecmp of '100.5' and '9.5' is => int(-8) +- strcasecmp of '100.5' and '11.5' is => int(-1) - strcasecmp of '100.5' and '100.5' is => int(0) -- strcasecmp of '100.5' and '105' is => int(-%d) -- strcasecmp of '100.5' and '-10.5' is => int(%d) -- strcasecmp of '100.5' and '10' is => int(%d) -- strcasecmp of '100.5' and '0.5' is => int(%d) +- strcasecmp of '100.5' and '105' is => int(-5) +- strcasecmp of '100.5' and '-10.5' is => int(4) +- strcasecmp of '100.5' and '10' is => int(3) +- strcasecmp of '100.5' and '0.5' is => int(1) Iteration 5 -- strcasecmp of '105' and '10.5' is => int(%d) -- strcasecmp of '105' and '1.5' is => int(%d) -- strcasecmp of '105' and '9.5' is => int(-%d) -- strcasecmp of '105' and '11.5' is => int(-%d) -- strcasecmp of '105' and '100.5' is => int(%d) +- strcasecmp of '105' and '10.5' is => int(7) +- strcasecmp of '105' and '1.5' is => int(2) +- strcasecmp of '105' and '9.5' is => int(-8) +- strcasecmp of '105' and '11.5' is => int(-1) +- strcasecmp of '105' and '100.5' is => int(5) - strcasecmp of '105' and '105' is => int(0) -- strcasecmp of '105' and '-10.5' is => int(%d) -- strcasecmp of '105' and '10' is => int(%d) -- strcasecmp of '105' and '0.5' is => int(%d) +- strcasecmp of '105' and '-10.5' is => int(4) +- strcasecmp of '105' and '10' is => int(1) +- strcasecmp of '105' and '0.5' is => int(1) Iteration 6 -- strcasecmp of '-10.5' and '10.5' is => int(-%d) -- strcasecmp of '-10.5' and '1.5' is => int(-%d) -- strcasecmp of '-10.5' and '9.5' is => int(-%d) -- strcasecmp of '-10.5' and '11.5' is => int(-%d) -- strcasecmp of '-10.5' and '100.5' is => int(-%d) -- strcasecmp of '-10.5' and '105' is => int(-%d) +- strcasecmp of '-10.5' and '10.5' is => int(-4) +- strcasecmp of '-10.5' and '1.5' is => int(-4) +- strcasecmp of '-10.5' and '9.5' is => int(-12) +- strcasecmp of '-10.5' and '11.5' is => int(-4) +- strcasecmp of '-10.5' and '100.5' is => int(-4) +- strcasecmp of '-10.5' and '105' is => int(-4) - strcasecmp of '-10.5' and '-10.5' is => int(0) -- strcasecmp of '-10.5' and '10' is => int(-%d) -- strcasecmp of '-10.5' and '0.5' is => int(-%d) +- strcasecmp of '-10.5' and '10' is => int(-4) +- strcasecmp of '-10.5' and '0.5' is => int(-3) Iteration 7 -- strcasecmp of '10' and '10.5' is => int(-%d) -- strcasecmp of '10' and '1.5' is => int(%d) -- strcasecmp of '10' and '9.5' is => int(-%d) -- strcasecmp of '10' and '11.5' is => int(-%d) -- strcasecmp of '10' and '100.5' is => int(-%d) -- strcasecmp of '10' and '105' is => int(-%d) -- strcasecmp of '10' and '-10.5' is => int(%d) +- strcasecmp of '10' and '10.5' is => int(-2) +- strcasecmp of '10' and '1.5' is => int(2) +- strcasecmp of '10' and '9.5' is => int(-8) +- strcasecmp of '10' and '11.5' is => int(-1) +- strcasecmp of '10' and '100.5' is => int(-3) +- strcasecmp of '10' and '105' is => int(-1) +- strcasecmp of '10' and '-10.5' is => int(4) - strcasecmp of '10' and '10' is => int(0) -- strcasecmp of '10' and '0.5' is => int(%d) +- strcasecmp of '10' and '0.5' is => int(1) Iteration 8 -- strcasecmp of '0.5' and '10.5' is => int(-%d) -- strcasecmp of '0.5' and '1.5' is => int(-%d) -- strcasecmp of '0.5' and '9.5' is => int(-%d) -- strcasecmp of '0.5' and '11.5' is => int(-%d) -- strcasecmp of '0.5' and '100.5' is => int(-%d) -- strcasecmp of '0.5' and '105' is => int(-%d) -- strcasecmp of '0.5' and '-10.5' is => int(%d) -- strcasecmp of '0.5' and '10' is => int(-%d) +- strcasecmp of '0.5' and '10.5' is => int(-1) +- strcasecmp of '0.5' and '1.5' is => int(-1) +- strcasecmp of '0.5' and '9.5' is => int(-9) +- strcasecmp of '0.5' and '11.5' is => int(-1) +- strcasecmp of '0.5' and '100.5' is => int(-1) +- strcasecmp of '0.5' and '105' is => int(-1) +- strcasecmp of '0.5' and '-10.5' is => int(3) +- strcasecmp of '0.5' and '10' is => int(-1) - strcasecmp of '0.5' and '0.5' is => int(0) #### Testing Miscelleneous inputs #### --- Testing objects --- -int(-%d) +int(-1) --- Testing arrays --- -Notice: Array to string conversion in %s on line %d -int(%d) -int(%d) -int(%d) +Warning: strcasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL +int(41) +int(71) --- Testing Resources --- int(0) -int(%d) +int(67) --- Testing a longer and heredoc string --- int(0) -int(-%d) -int(%d) +int(-23) +int(59) --- Testing a heredoc null string --- -int(-%d) +int(-1) int(0) -int(-%d) +int(-1) --- Testing simple and complex syntax strings --- -int(-%d) -int(-%d) +int(-15) +int(-15) Notice: Undefined variable: strS in %s on line %d -int(%d) -int(-%d) -int(-%d) +int(13) +int(-15) +int(-15) --- Testing binary safe and binary chars --- -int(%d) -int(-%d) +int(6) +int(-119) int(0) int(0) -int(%d) -int(%d) -int(%d) +int(1) +int(1) +int(1) --- Comparing long float values --- int(0) -int(-%d) +int(-1) int(0) #### checking error conditions #### -Warning: Wrong parameter count for strcasecmp() in %s on line %d +Warning: strcasecmp() expects exactly 2 parameters, 0 given in %s on line %d -Warning: Wrong parameter count for strcasecmp() in %s on line %d +Warning: strcasecmp() expects exactly 2 parameters, 1 given in %s on line %d -Warning: Wrong parameter count for strcasecmp() in %s on line %d +Warning: strcasecmp() expects exactly 2 parameters, 1 given in %s on line %d -Warning: Wrong parameter count for strcasecmp() in %s on line %d +Warning: strcasecmp() expects exactly 2 parameters, 3 given in %s on line %d Done Index: ext/standard/tests/strings/strcmp.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strcmp.phpt,v retrieving revision 1.3.2.3 diff -u -p -d -r1.3.2.3 strcmp.phpt --- ext/standard/tests/strings/strcmp.phpt 1 May 2007 00:05:39 -0000 1.3.2.3 +++ ext/standard/tests/strings/strcmp.phpt 9 Jun 2008 10:42:45 -0000 @@ -591,8 +591,8 @@ int(-%d) --- Testing arrays --- -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strcmp() expects parameter 2 to be string, array given in %s on line %d +NULL int(%d) int(%d) @@ -634,11 +634,11 @@ int(-%d) int(0) #### checking error conditions #### -Warning: Wrong parameter count for strcmp() in %s on line %d +Warning: strcmp() expects exactly 2 parameters, 0 given in %s on line %d -Warning: Wrong parameter count for strcmp() in %s on line %d +Warning: strcmp() expects exactly 2 parameters, 1 given in %s on line %d -Warning: Wrong parameter count for strcmp() in %s on line %d +Warning: strcmp() expects exactly 2 parameters, 1 given in %s on line %d -Warning: Wrong parameter count for strcmp() in %s on line %d +Warning: strcmp() expects exactly 2 parameters, 3 given in %s on line %d Done Index: ext/standard/tests/strings/strlen.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strlen.phpt,v retrieving revision 1.1.2.2 diff -u -p -d -r1.1.2.2 strlen.phpt --- ext/standard/tests/strings/strlen.phpt 28 Mar 2007 09:08:08 -0000 1.1.2.2 +++ ext/standard/tests/strings/strlen.phpt 9 Jun 2008 10:42:45 -0000 @@ -196,8 +196,8 @@ int(12) --- Testing arrays --- -Notice: Array to string conversion in %s on line %d -int(5) +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d +NULL int(6) int(20) @@ -228,9 +228,9 @@ int(12) int(1) #### error conditions #### -Warning: Wrong parameter count for strlen() in %s on line %d +Warning: strlen() expects exactly 1 parameter, 0 given in %s on line %d -Warning: Wrong parameter count for strlen() in %s on line %d +Warning: strlen() expects exactly 1 parameter, 2 given in %s on line %d -Warning: Wrong parameter count for strlen() in %s on line %d +Warning: strlen() expects exactly 1 parameter, 2 given in %s on line %d Done Index: ext/standard/tests/strings/strncasecmp_error.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strncasecmp_error.phpt,v retrieving revision 1.1.2.1 diff -u -p -d -r1.1.2.1 strncasecmp_error.phpt --- ext/standard/tests/strings/strncasecmp_error.phpt 14 Sep 2007 19:02:07 -0000 1.1.2.1 +++ ext/standard/tests/strings/strncasecmp_error.phpt 9 Jun 2008 10:42:45 -0000 @@ -32,18 +32,18 @@ echo "*** Done ***\n"; *** Testing strncasecmp() function: error conditions *** -- Testing strncasecmp() function with Zero arguments -- -Warning: Wrong parameter count for strncasecmp() in %s on line %d +Warning: strncasecmp() expects exactly 3 parameters, 0 given in %s on line %d NULL -- Testing strncasecmp() function with less than expected number of arguments -- -Warning: Wrong parameter count for strncasecmp() in %s on line %d +Warning: strncasecmp() expects exactly 3 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for strncasecmp() in %s on line %d +Warning: strncasecmp() expects exactly 3 parameters, 2 given in %s on line %d NULL -- Testing strncasecmp() function with more than expected number of arguments -- -Warning: Wrong parameter count for strncasecmp() in %s on line %d +Warning: strncasecmp() expects exactly 3 parameters, 4 given in %s on line %d NULL -- Testing strncasecmp() function with invalid argument -- Index: ext/standard/tests/strings/strncasecmp_variation10.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strncasecmp_variation10.phpt,v retrieving revision 1.1.2.1 diff -u -p -d -r1.1.2.1 strncasecmp_variation10.phpt --- ext/standard/tests/strings/strncasecmp_variation10.phpt 14 Sep 2007 19:02:07 -0000 1.1.2.1 +++ ext/standard/tests/strings/strncasecmp_variation10.phpt 9 Jun 2008 10:42:45 -0000 @@ -100,85 +100,89 @@ echo "*** Done ***\n"; --EXPECTF-- *** Testing strncasecmp() function: with unexpected values for 'str1' *** -- Iteration 1 -- -int(-%d) +int(-67) -- Iteration 2 -- -int(-%d) +int(-66) -- Iteration 3 -- -int(-%d) +int(-66) -- Iteration 4 -- -int(-%d) +int(-70) -- Iteration 5 -- -int(-%d) +int(-66) -- Iteration 6 -- -int(-%d) +int(-70) -- Iteration 7 -- -int(-%d) +int(-66) -- Iteration 8 -- -int(-%d) +int(-66) -- Iteration 9 -- -int(-%d) +int(-67) -- Iteration 10 -- -int(-%d) +int(-66) -- Iteration 11 -- -int(-%d) +int(-70) -- Iteration 12 -- -int(-%d) +int(-66) -- Iteration 13 -- -int(-%d) +int(-70) -- Iteration 14 -- -int(-%d) +int(-66) -- Iteration 15 -- -Notice: Array to string conversion in %s on line 88 +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line 89 -int(-%d) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 16 -- -Notice: Array to string conversion in %s on line 88 +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line 89 -int(-%d) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 17 -- -Notice: Array to string conversion in %s on line 88 +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line 89 -int(-%d) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 18 -- -Notice: Array to string conversion in %s on line 88 +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line 89 -int(-%d) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 19 -- -Notice: Array to string conversion in %s on line 88 +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line 89 -int(-%d) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 20 -- -int(-%d) +int(-66) -- Iteration 21 -- -int(-%d) +int(-1) -- Iteration 22 -- -int(-%d) +int(-66) -- Iteration 23 -- -int(-%d) +int(-1) -- Iteration 24 -- -int(-%d) +int(-1) -- Iteration 25 -- -int(-%d) +int(-1) -- Iteration 26 -- -int(-%d) +int(-1) -- Iteration 27 -- -int(-%d) +int(-1) -- Iteration 28 -- -int(-%d) +int(-1) -- Iteration 29 -- -int(-%d) +int(-1) -- Iteration 30 -- -int(-%d) + +Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d + +Warning: strncasecmp() expects parameter 1 to be string, resource given in %s on line %d +NULL -- Iteration 31 -- -int(-%d) +int(-4) *** Done *** Index: ext/standard/tests/strings/strncasecmp_variation11.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strncasecmp_variation11.phpt,v retrieving revision 1.1.2.1 diff -u -p -d -r1.1.2.1 strncasecmp_variation11.phpt --- ext/standard/tests/strings/strncasecmp_variation11.phpt 14 Sep 2007 19:02:07 -0000 1.1.2.1 +++ ext/standard/tests/strings/strncasecmp_variation11.phpt 9 Jun 2008 10:42:45 -0000 @@ -130,34 +130,34 @@ int(%d) int(%d) -- Iteration 15 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL -- Iteration 16 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL -- Iteration 17 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL -- Iteration 18 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL -- Iteration 19 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL -- Iteration 20 -- int(%d) -- Iteration 21 -- @@ -179,7 +179,11 @@ int(%d) -- Iteration 29 -- int(%d) -- Iteration 30 -- -int(%d) + +Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d + +Warning: strncasecmp() expects parameter 2 to be string, resource given in %s on line %d +NULL -- Iteration 31 -- int(%d) *** Done *** Index: ext/standard/tests/strings/strncasecmp_variation4.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strncasecmp_variation4.phpt,v retrieving revision 1.1.2.1 diff -u -p -d -r1.1.2.1 strncasecmp_variation4.phpt --- ext/standard/tests/strings/strncasecmp_variation4.phpt 14 Sep 2007 19:02:07 -0000 1.1.2.1 +++ ext/standard/tests/strings/strncasecmp_variation4.phpt 9 Jun 2008 10:42:45 -0000 @@ -130,44 +130,34 @@ int(0) int(0) -- Iteration 15 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 16 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 17 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 18 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 19 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 20 -- int(0) -- Iteration 21 -- @@ -189,7 +179,11 @@ int(0) -- Iteration 29 -- int(0) -- Iteration 30 -- -int(0) + +Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d + +Warning: strncasecmp() expects parameter 1 to be string, resource given in %s on line %d +NULL -- Iteration 31 -- int(0) *** Done *** Index: ext/standard/tests/strings/strncasecmp_variation5.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strncasecmp_variation5.phpt,v retrieving revision 1.1.2.1 diff -u -p -d -r1.1.2.1 strncasecmp_variation5.phpt --- ext/standard/tests/strings/strncasecmp_variation5.phpt 14 Sep 2007 19:02:07 -0000 1.1.2.1 +++ ext/standard/tests/strings/strncasecmp_variation5.phpt 9 Jun 2008 10:42:45 -0000 @@ -109,15 +109,25 @@ int(0) -- Iteration 7 -- int(0) -- Iteration 8 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 9 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 10 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 11 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 12 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 13 -- int(0) -- Iteration 14 -- @@ -131,17 +141,23 @@ int(0) -- Iteration 18 -- int(0) -- Iteration 19 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, string given in %s on line %d +NULL -- Iteration 20 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, string given in %s on line %d +NULL -- Iteration 21 -- int(0) -- Iteration 22 -- int(0) -- Iteration 23 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, resource given in %s on line %d +NULL -- Iteration 24 -- -Notice: Object of class sample could not be converted to int in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 3 to be long, object given in %s on line %d +NULL *** Done *** Index: ext/standard/tests/strings/strncmp_error.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strncmp_error.phpt,v retrieving revision 1.1.2.1 diff -u -p -d -r1.1.2.1 strncmp_error.phpt --- ext/standard/tests/strings/strncmp_error.phpt 7 Sep 2007 14:20:12 -0000 1.1.2.1 +++ ext/standard/tests/strings/strncmp_error.phpt 9 Jun 2008 10:42:45 -0000 @@ -28,16 +28,16 @@ echo "*** Done ***\n"; --EXPECTF-- *** Testing strncmp() function: error conditions *** -Warning: Wrong parameter count for strncmp() in %s on line %d +Warning: strncmp() expects exactly 3 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for strncmp() in %s on line %d +Warning: strncmp() expects exactly 3 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for strncmp() in %s on line %d +Warning: strncmp() expects exactly 3 parameters, 2 given in %s on line %d NULL -Warning: Wrong parameter count for strncmp() in %s on line %d +Warning: strncmp() expects exactly 3 parameters, 4 given in %s on line %d NULL Warning: Length must be greater than or equal to 0 in %s on line %d Index: ext/standard/tests/strings/strncmp_variation4.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strncmp_variation4.phpt,v retrieving revision 1.1.2.1 diff -u -p -d -r1.1.2.1 strncmp_variation4.phpt --- ext/standard/tests/strings/strncmp_variation4.phpt 7 Sep 2007 14:20:12 -0000 1.1.2.1 +++ ext/standard/tests/strings/strncmp_variation4.phpt 9 Jun 2008 10:42:45 -0000 @@ -133,44 +133,34 @@ int(0) int(0) -- Iteration 15 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 16 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 17 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 18 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 19 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 20 -- int(0) -- Iteration 21 -- @@ -192,7 +182,11 @@ int(0) -- Iteration 29 -- int(0) -- Iteration 30 -- -int(0) + +Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d + +Warning: strncmp() expects parameter 1 to be string, resource given in %s on line %d +NULL -- Iteration 31 -- int(0) *** Done *** Index: ext/standard/tests/strings/strncmp_variation5.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/strings/strncmp_variation5.phpt,v retrieving revision 1.1.2.1 diff -u -p -d -r1.1.2.1 strncmp_variation5.phpt --- ext/standard/tests/strings/strncmp_variation5.phpt 7 Sep 2007 14:20:12 -0000 1.1.2.1 +++ ext/standard/tests/strings/strncmp_variation5.phpt 9 Jun 2008 10:42:45 -0000 @@ -123,15 +123,25 @@ int(0) -- Iteration 10 -- int(0) -- Iteration 11 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 12 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 13 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 14 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 15 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 16 -- int(0) -- Iteration 17 -- @@ -145,17 +155,23 @@ int(0) -- Iteration 21 -- int(0) -- Iteration 22 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, string given in %s on line %d +NULL -- Iteration 23 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, string given in %s on line %d +NULL -- Iteration 24 -- int(0) -- Iteration 25 -- int(0) -- Iteration 26 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, resource given in %s on line %d +NULL -- Iteration 27 -- -Notice: Object of class sample could not be converted to int in %s on line %d -int(0) +Warning: strncmp() expects parameter 3 to be long, object given in %s on line %d +NULL *** Done ***