From 6821b67124604da690c5e9276d5370d679c63ac8 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Wed, 25 Mar 2009 19:39:21 -0400 Subject: Imported Upstream version 5.3.0RC1 --- ext/pcre/php_pcre.c | 199 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 129 insertions(+), 70 deletions(-) (limited to 'ext/pcre/php_pcre.c') diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 19bd50bbc..d4f291db1 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.168.2.9.2.30 2009/01/13 19:23:31 andrei Exp $ */ +/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.30 2009/01/28 22:39:30 nlopess Exp $ */ #include "php.h" #include "php_ini.h" @@ -250,7 +250,6 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_le /* Try to lookup the cached regex entry, and if successful, just pass back the compiled pattern, otherwise go on and compile it. */ - regex_len = strlen(regex); if (zend_hash_find(&PCRE_G(pcre_cache), regex, regex_len+1, (void **)&pce) == SUCCESS) { /* * We use a quick pcre_info() check to see whether cache is corrupted, and if it @@ -533,7 +532,6 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec int matched; /* Has anything matched */ int g_notempty = 0; /* If the match should not be empty */ const char **stringlist; /* Holds list of subpatterns */ - char *match; /* The current match */ char **subpat_names; /* Array for named subpatterns */ int i, rc; int subpats_order; /* Order of subpattern matches */ @@ -612,7 +610,6 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec } } - match = NULL; matched = 0; PCRE_G(error_code) = PHP_PCRE_NO_ERROR; @@ -624,7 +621,7 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec /* the string was already proved to be valid UTF-8 */ exoptions |= PCRE_NO_UTF8_CHECK; - /* Check for too many substrings condition. */ + /* Check for too many substrings condition. */ if (count == 0) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Matched, but too many substrings"); count = size_offsets/3; @@ -633,7 +630,6 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec /* If something has matched */ if (count > 0) { matched++; - match = subject + offsets[0]; /* If subpatterns array has been passed, fill it in with values. */ if (subpats != NULL) { @@ -741,7 +737,7 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec if (subpat_names[i]) { zend_hash_update(Z_ARRVAL_P(subpats), subpat_names[i], strlen(subpat_names[i])+1, &match_sets[i], sizeof(zval *), NULL); - ZVAL_ADDREF(match_sets[i]); + Z_ADDREF_P(match_sets[i]); } zend_hash_next_index_insert(Z_ARRVAL_P(subpats), &match_sets[i], sizeof(zval *), NULL); } @@ -755,17 +751,17 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec } /* }}} */ -/* {{{ proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]]) +/* {{{ proto int preg_match(string pattern, string subject [, array &subpatterns [, int flags [, int offset]]]) Perform a Perl-style regular expression match */ -PHP_FUNCTION(preg_match) +static PHP_FUNCTION(preg_match) { php_do_pcre_match(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ -/* {{{ proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]]) +/* {{{ proto int preg_match_all(string pattern, string subject, array &subpatterns [, int flags [, int offset]]) Perform a Perl-style global regular expression match */ -PHP_FUNCTION(preg_match_all) +static PHP_FUNCTION(preg_match_all) { php_do_pcre_match(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } @@ -842,8 +838,8 @@ static int preg_do_repl_func(zval *function, char *subject, int *offsets, char * result_len = offsets[1] - offsets[0]; *result = estrndup(&subject[offsets[0]], result_len); } - zval_dtor(subpats); - FREE_ZVAL(subpats); + + zval_ptr_dtor(&subpats); return result_len; } @@ -898,7 +894,6 @@ static int preg_do_eval(char *eval_str, int eval_str_len, char *subject, } else { esc_match = ""; esc_match_len = 0; - match_len = 0; } smart_str_appendl(&code, esc_match, esc_match_len); @@ -1044,7 +1039,7 @@ PHPAPI char *php_pcre_replace_impl(pcre_cache_entry *pce, char *subject, int sub /* Execute the regular expression. */ count = pcre_exec(pce->re, extra, subject, subject_len, start_offset, exoptions|g_notempty, offsets, size_offsets); - + /* the string was already proved to be valid UTF-8 */ exoptions |= PCRE_NO_UTF8_CHECK; @@ -1197,7 +1192,7 @@ PHPAPI char *php_pcre_replace_impl(pcre_cache_entry *pce, char *subject, int sub /* {{{ php_replace_in_subject */ -static char *php_replace_in_subject(zval *regex, zval *replace, zval **subject, int *result_len, int limit, zend_bool is_callable_replace, int *replace_count TSRMLS_DC) +static char *php_replace_in_subject(zval *regex, zval *replace, zval **subject, int *result_len, int limit, int is_callable_replace, int *replace_count TSRMLS_DC) { zval **regex_entry, **replace_entry = NULL, @@ -1285,38 +1280,38 @@ static char *php_replace_in_subject(zval *regex, zval *replace, zval **subject, /* {{{ preg_replace_impl */ -static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callable_replace) +static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, int is_callable_replace, int is_filter) { zval **regex, **replace, **subject, - **limit, **subject_entry, - **zcount; + **zcount = NULL; char *result; int result_len; int limit_val = -1; + long limit = -1; char *string_key; ulong num_key; char *callback_name; - int replace_count=0; - int *replace_count_ptr=NULL; + int replace_count=0, old_replace_count; /* Get function parameters and do error-checking. */ - if (ZEND_NUM_ARGS() < 3 || ZEND_NUM_ARGS() > 5 || - zend_get_parameters_ex(ZEND_NUM_ARGS(), ®ex, &replace, &subject, &limit, &zcount) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZZ|lZ", ®ex, &replace, &subject, &limit, &zcount) == FAILURE) { + return; } + if (!is_callable_replace && Z_TYPE_PP(replace) == IS_ARRAY && Z_TYPE_PP(regex) != IS_ARRAY) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter mismatch, pattern is a string while replacement is an array"); RETURN_FALSE; } SEPARATE_ZVAL(replace); - if (Z_TYPE_PP(replace) != IS_ARRAY) + if (Z_TYPE_PP(replace) != IS_ARRAY && (Z_TYPE_PP(replace) != IS_OBJECT || !is_callable_replace)) { convert_to_string_ex(replace); + } if (is_callable_replace) { - if (!zend_is_callable(*replace, 0, &callback_name)) { + if (!zend_is_callable(*replace, 0, &callback_name TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Requires argument 2, '%s', to be a valid callback", callback_name); efree(callback_name); *return_value = **subject; @@ -1331,11 +1326,7 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl SEPARATE_ZVAL(subject); if (ZEND_NUM_ARGS() > 3) { - convert_to_long_ex(limit); - limit_val = Z_LVAL_PP(limit); - } - if (ZEND_NUM_ARGS() > 4) { - replace_count_ptr =& replace_count; + limit_val = limit; } if (Z_TYPE_PP(regex) != IS_ARRAY) @@ -1350,10 +1341,12 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl and add the result to the return_value array. */ while (zend_hash_get_current_data(Z_ARRVAL_PP(subject), (void **)&subject_entry) == SUCCESS) { SEPARATE_ZVAL(subject_entry); - if ((result = php_replace_in_subject(*regex, *replace, subject_entry, &result_len, limit_val, is_callable_replace, replace_count_ptr TSRMLS_CC)) != NULL) { - /* Add to return array */ - switch(zend_hash_get_current_key(Z_ARRVAL_PP(subject), &string_key, &num_key, 0)) - { + old_replace_count = replace_count; + if ((result = php_replace_in_subject(*regex, *replace, subject_entry, &result_len, limit_val, is_callable_replace, &replace_count TSRMLS_CC)) != NULL) { + if (!is_filter || replace_count > old_replace_count) { + /* Add to return array */ + switch(zend_hash_get_current_key(Z_ARRVAL_PP(subject), &string_key, &num_key, 0)) + { case HASH_KEY_IS_STRING: add_assoc_stringl(return_value, string_key, result, result_len, 0); break; @@ -1361,17 +1354,25 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl case HASH_KEY_IS_LONG: add_index_stringl(return_value, num_key, result, result_len, 0); break; + } + } else { + efree(result); } } zend_hash_move_forward(Z_ARRVAL_PP(subject)); } } else { /* if subject is not an array */ - if ((result = php_replace_in_subject(*regex, *replace, subject, &result_len, limit_val, is_callable_replace, replace_count_ptr TSRMLS_CC)) != NULL) { - RETVAL_STRINGL(result, result_len, 0); + old_replace_count = replace_count; + if ((result = php_replace_in_subject(*regex, *replace, subject, &result_len, limit_val, is_callable_replace, &replace_count TSRMLS_CC)) != NULL) { + if (!is_filter || replace_count > old_replace_count) { + RETVAL_STRINGL(result, result_len, 0); + } else { + efree(result); + } } } - if (replace_count_ptr) { + if (ZEND_NUM_ARGS() > 4) { zval_dtor(*zcount); ZVAL_LONG(*zcount, replace_count); } @@ -1379,25 +1380,33 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl } /* }}} */ -/* {{{ proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]]) +/* {{{ proto mixed preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, int &count]]) Perform Perl-style regular expression replacement. */ -PHP_FUNCTION(preg_replace) +static PHP_FUNCTION(preg_replace) { - preg_replace_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); + preg_replace_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 0); } /* }}} */ -/* {{{ proto string preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, count]]) +/* {{{ proto mixed preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, int &count]]) Perform Perl-style regular expression replacement using replacement callback. */ -PHP_FUNCTION(preg_replace_callback) +static PHP_FUNCTION(preg_replace_callback) +{ + preg_replace_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1, 0); +} +/* }}} */ + +/* {{{ proto mixed preg_filter(mixed regex, mixed replace, mixed subject [, int limit [, int &count]]) + Perform Perl-style regular expression replacement and only return matches. */ +static PHP_FUNCTION(preg_filter) { - preg_replace_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); + preg_replace_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 1); } /* }}} */ /* {{{ proto array preg_split(string pattern, string subject [, int limit [, int flags]]) Split string into an array using a perl-style regular expression as a delimiter */ -PHP_FUNCTION(preg_split) +static PHP_FUNCTION(preg_split) { char *regex; /* Regular expression */ char *subject; /* String to match against */ @@ -1438,8 +1447,7 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec int start_offset; /* Where the new search starts */ int next_offset; /* End of the last delimiter match + 1 */ int g_notempty = 0; /* If the match should not be empty */ - char *match, /* The current match */ - *last_match; /* Location of last match */ + char *last_match; /* Location of last match */ int rc; int no_empty; /* If NO_EMPTY flag is set */ int delim_capture; /* If delimiters should be captured */ @@ -1476,7 +1484,6 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec start_offset = 0; next_offset = 0; last_match = subject; - match = NULL; PCRE_G(error_code) = PHP_PCRE_NO_ERROR; /* Get next piece if no limit or limit not yet reached and something matched*/ @@ -1496,8 +1503,6 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec /* If something matched */ if (count > 0) { - match = subject + offsets[0]; - if (!no_empty || &subject[offsets[0]] != last_match) { if (offset_capture) { @@ -1551,9 +1556,8 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec subject_len, start_offset, exoptions, offsets, size_offsets); if (count < 1) { - php_error_docref(NULL TSRMLS_CC,E_NOTICE, "Unknown error"); - offsets[0] = start_offset; - offsets[1] = start_offset + 1; + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown error"); + RETURN_FALSE; } } else { offsets[0] = start_offset; @@ -1598,12 +1602,12 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec /* {{{ proto string preg_quote(string str [, string delim_char]) Quote regular expression characters plus an optional character */ -PHP_FUNCTION(preg_quote) +static PHP_FUNCTION(preg_quote) { int in_str_len; char *in_str; /* Input string argument */ char *in_str_end; /* End of the input string */ - int delim_len; + int delim_len = 0; char *delim = NULL; /* Additional delimiter argument */ char *out_str, /* Output string with quoted characters */ *p, /* Iterator for input string */ @@ -1657,6 +1661,7 @@ PHP_FUNCTION(preg_quote) case '<': case '|': case ':': + case '-': *q++ = '\\'; *q++ = c; break; @@ -1684,7 +1689,7 @@ PHP_FUNCTION(preg_quote) /* {{{ proto array preg_grep(string regex, array input [, int flags]) Searches array and returns entries which match regex */ -PHP_FUNCTION(preg_grep) +static PHP_FUNCTION(preg_grep) { char *regex; /* Regular expression */ int regex_len; @@ -1770,7 +1775,8 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return /* If the entry fits our requirements */ if ((count > 0 && !invert) || (count == PCRE_ERROR_NOMATCH && invert)) { - ZVAL_ADDREF(*entry); + + Z_ADDREF_PP(entry); /* Add to return array */ switch (zend_hash_get_current_key(Z_ARRVAL_P(input), &string_key, &num_key, 0)) @@ -1801,7 +1807,7 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return /* {{{ proto int preg_last_error() Returns the error code of the last regexp execution. */ -PHP_FUNCTION(preg_last_error) +static PHP_FUNCTION(preg_last_error) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) { return; @@ -1813,15 +1819,71 @@ PHP_FUNCTION(preg_last_error) /* {{{ module definition structures */ -zend_function_entry pcre_functions[] = { - PHP_FE(preg_match, third_arg_force_ref) - PHP_FE(preg_match_all, third_arg_force_ref) - PHP_FE(preg_replace, fifth_arg_force_ref) - PHP_FE(preg_replace_callback, fifth_arg_force_ref) - PHP_FE(preg_split, NULL) - PHP_FE(preg_quote, NULL) - PHP_FE(preg_grep, NULL) - PHP_FE(preg_last_error, NULL) +/* {{{ arginfo */ +ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match, 0, 0, 2) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, subject) + ZEND_ARG_INFO(1, subpatterns) /* array */ + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match_all, 0, 0, 3) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, subject) + ZEND_ARG_INFO(1, subpatterns) /* array */ + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_replace, 0, 0, 2) + ZEND_ARG_INFO(0, regex) + ZEND_ARG_INFO(0, replace) + ZEND_ARG_INFO(0, subject) + ZEND_ARG_INFO(0, limit) + ZEND_ARG_INFO(1, count) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_replace_callback, 0, 0, 3) + ZEND_ARG_INFO(0, regex) + ZEND_ARG_INFO(0, callback) + ZEND_ARG_INFO(0, subject) + ZEND_ARG_INFO(0, limit) + ZEND_ARG_INFO(1, count) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_split, 0, 0, 2) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, subject) + ZEND_ARG_INFO(0, limit) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_quote, 0, 0, 1) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, delim_char) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_grep, 0, 0, 2) + ZEND_ARG_INFO(0, regex) + ZEND_ARG_INFO(0, input) /* array */ + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_preg_last_error, 0) +ZEND_END_ARG_INFO() +/* }}} */ + +static const zend_function_entry pcre_functions[] = { + PHP_FE(preg_match, arginfo_preg_match) + PHP_FE(preg_match_all, arginfo_preg_match_all) + PHP_FE(preg_replace, arginfo_preg_replace) + PHP_FE(preg_replace_callback, arginfo_preg_replace_callback) + PHP_FE(preg_filter, arginfo_preg_replace) + PHP_FE(preg_split, arginfo_preg_split) + PHP_FE(preg_quote, arginfo_preg_quote) + PHP_FE(preg_grep, arginfo_preg_grep) + PHP_FE(preg_last_error, arginfo_preg_last_error) {NULL, NULL, NULL} }; @@ -1844,9 +1906,6 @@ zend_module_entry pcre_module_entry = { #ifdef COMPILE_DL_PCRE ZEND_GET_MODULE(pcre) -# ifdef PHP_WIN32 -# include "zend_arg_defs.c" -# endif #endif /* }}} */ -- cgit v1.2.3 From 84f4ca9b07fe5b73d840258f4aa7c1eb534c4253 Mon Sep 17 00:00:00 2001 From: Sean Finney Date: Wed, 24 Jun 2009 22:49:04 +0200 Subject: Imported Upstream version 5.3.0~RC4 --- EXTENSIONS | 6 +- NEWS | 157 +- README.PARAMETER_PARSING_API | 1 + README.RELEASE_PROCESS | 45 +- README.UPDATE_5_2 | 1022 - README.namespaces | 70 +- TSRM/tsrm_virtual_cwd.c | 161 +- TSRM/tsrm_virtual_cwd.h | 9 +- TSRM/tsrm_win32.c | 163 +- TSRM/tsrm_win32.h | 3 +- UPGRADING | 73 +- Zend/Zend.m4 | 34 +- Zend/tests/017.phpt | 2 +- Zend/tests/029.phpt | 34 - Zend/tests/bug39018.phpt | 2 +- Zend/tests/bug42143.phpt | 38 + Zend/tests/bug43027.phpt | 1 - Zend/tests/bug47516.phpt | 36 + Zend/tests/bug47596.phpt | 63 + Zend/tests/bug47699.phpt | 18 + Zend/tests/bug47714.phpt | 27 + Zend/tests/bug47771.phpt | 30 + Zend/tests/bug47801.phpt | 31 + Zend/tests/bug47836.phpt | 16 + Zend/tests/bug47880.phpt | 15 + Zend/tests/bug47981.phpt | 19 + Zend/tests/bug48004.phpt | 21 + Zend/tests/bug48215.phpt | 38 + Zend/tests/bug48228.phpt | 32 + Zend/tests/bug48248.phpt | 27 + Zend/tests/bug48408.phpt | 30 + Zend/tests/bug48409.phpt | 67 + Zend/tests/bug48428.phpt | 13 + Zend/tests/bug48533.phpt | 41 + Zend/tests/call_static_006.phpt | 2 +- Zend/tests/exception_010.phpt | 30 + Zend/tests/function_exists_basic.phpt | 39 + Zend/tests/function_exists_error.phpt | 37 + Zend/tests/function_exists_variation1.phpt | 138 + Zend/tests/get_class_vars_003.phpt | 4 +- Zend/tests/get_class_vars_006.phpt | 4 +- Zend/tests/get_defined_functions_basic.phpt | 59 + Zend/tests/get_defined_functions_error.phpt | 29 + Zend/tests/int_overflow_64bit.phpt | 8 +- Zend/tests/int_underflow_32bit.phpt | 10 +- Zend/tests/jump12.phpt | 1 - Zend/tests/magic_methods_002.phpt | 2 +- Zend/tests/magic_methods_003.phpt | 2 +- Zend/tests/magic_methods_004.phpt | 2 +- Zend/tests/magic_methods_005.phpt | 2 +- Zend/tests/magic_methods_007.phpt | 2 +- Zend/tests/magic_methods_008.phpt | 2 +- Zend/tests/magic_methods_010.phpt | 2 +- Zend/tests/unset_cv05.phpt | 1 + Zend/tests/unset_cv06.phpt | 1 + Zend/zend.c | 12 +- Zend/zend.h | 19 +- Zend/zend_API.c | 39 +- Zend/zend_alloc.c | 13 +- Zend/zend_builtin_functions.c | 91 +- Zend/zend_compile.c | 74 +- Zend/zend_compile.h | 4 +- Zend/zend_exceptions.c | 18 +- Zend/zend_execute.c | 25 +- Zend/zend_execute.h | 25 +- Zend/zend_execute_API.c | 40 +- Zend/zend_extensions.c | 7 +- Zend/zend_extensions.h | 9 +- Zend/zend_gc.c | 279 +- Zend/zend_globals.h | 4 +- Zend/zend_hash.c | 6 +- Zend/zend_hash.h | 65 +- Zend/zend_highlight.c | 25 +- Zend/zend_ini_scanner.c | 339 +- Zend/zend_ini_scanner.l | 4 +- Zend/zend_ini_scanner_defs.h | 2 +- Zend/zend_interfaces.c | 12 +- Zend/zend_language_parser.c | 8 +- Zend/zend_language_parser.y | 8 +- Zend/zend_language_scanner.c | 10423 +- Zend/zend_language_scanner.l | 656 +- Zend/zend_language_scanner_defs.h | 6 +- Zend/zend_object_handlers.c | 81 +- Zend/zend_opcode.c | 4 +- Zend/zend_operators.c | 527 +- Zend/zend_operators.h | 133 +- Zend/zend_ptr_stack.h | 2 +- Zend/zend_stream.c | 9 +- Zend/zend_stream.h | 4 +- Zend/zend_types.h | 2 +- Zend/zend_variables.h | 6 +- Zend/zend_vm_def.h | 74 +- Zend/zend_vm_execute.h | 454 +- acinclude.m4 | 19 +- aclocal.m4 | 19 +- build/order_by_dep.awk | 5 +- configure | 8855 +- configure.in | 16 +- ext/bcmath/libbcmath/src/bcmath.h | 2 +- ext/bz2/bz2.c | 10 +- ext/bz2/config.w32 | 4 +- ext/com_dotnet/com_handlers.c | 6 +- ext/com_dotnet/com_iterator.c | 4 +- ext/com_dotnet/com_persist.c | 4 +- ext/com_dotnet/com_saproxy.c | 18 +- ext/curl/config.m4 | 119 +- ext/curl/config.w32 | 6 +- ext/curl/interface.c | 549 +- ext/curl/php_curl.h | 10 +- ext/curl/streams.c | 55 +- ext/curl/tests/bug45161.phpt | 16 + ext/curl/tests/bug46711.phpt | 13 +- ext/curl/tests/bug46739.phpt | 9 + ext/curl/tests/bug48203.phpt | 33 + ext/curl/tests/bug48514.phpt | 27 + ext/curl/tests/curl_001.phpt | 41 - ext/curl/tests/curl_002.phpt | 37 - ext/curl/tests/curl_003.phpt | 52 - ext/curl/tests/curl_004.phpt | 37 - ext/curl/tests/curl_005.phpt | 37 - ext/curl/tests/curl_006.phpt | 35 - ext/curl/tests/curl_basic_001.phpt | 45 + ext/curl/tests/curl_basic_002.phpt | 41 + ext/curl/tests/curl_basic_003.phpt | 56 + ext/curl/tests/curl_basic_004.phpt | 41 + ext/curl/tests/curl_basic_005.phpt | 41 + ext/curl/tests/curl_basic_006.phpt | 41 + ext/curl/tests/curl_basic_007.phpt | 24 + ext/curl/tests/curl_basic_008.phpt | 23 + ext/curl/tests/curl_basic_009.phpt | 23 + ext/curl/tests/curl_basic_010.phpt | 24 + ext/curl/tests/curl_basic_011.phpt | 38 + ext/curl/tests/curl_basic_012.phpt | 38 + ext/curl/tests/curl_basic_013.phpt | 38 + ext/curl/tests/curl_basic_014.phpt | 15 + ext/curl/tests/curl_basic_015.phpt | 16 + ext/curl/tests/curl_basic_016.phpt | 57 + ext/curl/tests/curl_basic_017.phpt | 69 + ext/curl/tests/curl_basic_018.phpt | 72 + ext/curl/tests/curl_basic_019.phpt | 28 + ext/curl/tests/curl_basic_020.phpt | 25 + ext/curl/tests/curl_basic_021.phpt | 24 + ext/curl/tests/responder/get.php | 48 +- ext/date/config.m4 | 25 - ext/date/config0.m4 | 25 + ext/date/lib/parse_iso_intervals.c | 48 +- ext/date/lib/parse_tz.c | 22 +- ext/date/lib/timelib_structs.h | 43 +- ext/date/lib/timezonedb.h | 2560 +- ext/date/lib/tm2unixtime.c | 24 +- ext/date/php_date.c | 117 +- ext/date/php_date.h | 5 +- ext/date/tests/002.phpt | 6 +- ext/date/tests/009_win32.phpt | 8 +- ext/date/tests/DateTimeZone_getOffset_basic1.phpt | 2 +- ext/date/tests/bug13142.phpt | 4 +- ext/date/tests/bug14561.phpt | 3 +- ext/date/tests/bug17988.phpt | 3 +- ext/date/tests/bug20382-1.phpt | 3 +- ext/date/tests/bug20382-2.phpt | 2 +- ext/date/tests/bug21399.phpt | 3 +- ext/date/tests/bug21966.phpt | 4 +- ext/date/tests/bug26090.phpt | 3 +- ext/date/tests/bug26317.phpt | 3 +- ext/date/tests/bug26320.phpt | 3 +- ext/date/tests/bug26694.phpt | 3 +- ext/date/tests/bug27719.phpt | 12 +- ext/date/tests/bug27780.phpt | 2 +- ext/date/tests/bug28024.phpt | 3 +- ext/date/tests/bug29150.phpt | 3 +- ext/date/tests/bug30532.phpt | 4 +- ext/date/tests/bug32086.phpt | 4 +- ext/date/tests/bug32270.phpt | 3 +- ext/date/tests/bug32555.phpt | 3 +- ext/date/tests/bug32588.phpt | 3 +- ext/date/tests/bug33414-1.phpt | 49 +- ext/date/tests/bug33414-2.phpt | 18 +- ext/date/tests/bug33415-1.phpt | 4 +- ext/date/tests/bug33532.phpt | 4 +- ext/date/tests/bug35425.phpt | 3 +- ext/date/tests/bug45682.phpt | 32 + ext/date/tests/bug46108.phpt | 19 + ext/date/tests/bug48058.phpt | 29 + ext/date/tests/bug48097.phpt | 38 + ext/date/tests/date_add_basic2.phpt | 14 + ext/date/tests/date_create-relative.phpt | 93 + ext/date/tests/date_create_from_format_basic.phpt | 14 + ext/date/tests/date_create_from_format_basic2.phpt | 13 + ext/date/tests/date_default_timezone_get-3.phpt | 3 +- ext/date/tests/date_get_last_errors_basic.phpt | 13 + ext/date/tests/date_parse_from_format_basic.phpt | 14 + ext/date/tests/date_sunrise_variation9.phpt | 12 +- ext/date/tests/date_sunset_variation9.phpt | 12 +- ext/date/tests/getdate_variation7.phpt | 34 +- ext/date/tests/gmdate_variation14.phpt | 4 +- ext/date/tests/gmstrftime_variation2.phpt | 4 +- ext/date/tests/idate_variation3.phpt | 4 +- ext/date/tests/localtime_variation3.phpt | 56 +- ext/date/tests/strftime_variation23.phpt | 4 +- ext/date/tests/strtotime-relative.phpt | 98 + ext/date/tests/strtotime_basic2.phpt | 13 + ext/date/tests/timezone_offset_get_basic1.phpt | 2 +- ext/dba/dba_db4.c | 4 +- ext/dba/tests/bug48240.phpt | 25 + ext/dba/tests/dba_cdb_make.phpt | 3 +- ext/dom/document.c | 11 +- ext/dom/tests/DOMAttr_construct_error_001.phpt | 17 + ext/dom/tests/DOMAttr_name_basic_001.phpt | 14 + ext/dom/tests/DOMAttr_ownerElement_error_001.phpt | 23 + ext/dom/tests/DOMAttr_value_basic_002.phpt | 15 + .../tests/DOMCDATASection_construct_error_001.phpt | 21 + .../DOMCharacterData_appendData_error_001.phpt | 19 + ext/dom/tests/DOMCharacterData_data_error_002.phpt | 14 + .../DOMCharacterData_deleteData_basic_001.phpt | 20 + .../DOMCharacterData_deleteData_error_001.phpt | 19 + .../DOMCharacterData_deleteData_error_002.phpt | 23 + .../DOMCharacterData_insertData_error_001.phpt | 19 + .../DOMCharacterData_replaceData_error_001.phpt | 19 + ext/dom/tests/DOMComment_construct_basic_001.phpt | 19 + ext/dom/tests/DOMComment_construct_error_001.phpt | 17 + .../DOMDocumentFragment_appendXML_basic_001.phpt | 22 + .../DOMDocumentFragment_appendXML_error_001.phpt | 14 + .../DOMDocumentFragment_appendXML_error_002.phpt | 19 + .../DOMDocumentFragment_appendXML_error_003.phpt | 19 + .../DOMDocumentFragment_construct_basic_001.phpt | 15 + .../DOMDocumentFragment_construct_basic_002.phpt | 16 + .../DOMDocumentFragment_construct_error_001.phpt | 17 + ext/dom/tests/DOMDocumentType_basic_001.phpt | 48 + .../tests/DOMDocumentType_entities_error_001.phpt | 14 + .../DOMDocumentType_internalSubset_error_001.phpt | 14 + ext/dom/tests/DOMDocumentType_name_error_001.phpt | 14 + .../tests/DOMDocumentType_notations_error_001.phpt | 14 + .../tests/DOMDocumentType_publicId_basic_001.phpt | 19 + .../tests/DOMDocumentType_publicId_error_001.phpt | 14 + .../tests/DOMDocumentType_systemId_basic_001.phpt | 19 + .../tests/DOMDocumentType_systemId_error_001.phpt | 14 + ext/dom/tests/bug47849.phpt | 22 + ext/dom/xpath.c | 4 +- ext/ereg/ereg.c | 53 +- ext/ereg/php_ereg.h | 3 +- ext/ereg/tests/split_variation_004.phpt | 12 +- ext/ereg/tests/spliti_variation_004.phpt | 12 +- ext/exif/exif.c | 14 +- ext/exif/tests/bug48378.jpeg | Bin 0 -> 2566 bytes ext/exif/tests/bug48378.phpt | 19 + ext/exif/tests/exif006.phpt | 1 + ext/fileinfo/data_file.c | 68521 +++++----- ext/fileinfo/libmagic/apprentice.c | 56 +- ext/fileinfo/libmagic/apptype.c | 2 +- ext/fileinfo/libmagic/cdf.c | 318 +- ext/fileinfo/libmagic/cdf.h | 41 +- ext/fileinfo/libmagic/compress.c | 3 + ext/fileinfo/libmagic/file.h | 7 +- ext/fileinfo/libmagic/funcs.c | 6 +- ext/fileinfo/libmagic/magic.c | 17 +- ext/fileinfo/libmagic/patchlevel.h | 8 +- ext/fileinfo/libmagic/readcdf.c | 88 +- ext/fileinfo/libmagic/softmagic.c | 9 +- ext/filter/filter.c | 18 +- ext/filter/logical_filters.c | 39 +- ext/filter/tests/046.phpt | 4 - ext/filter/tests/bug39763.phpt | 3 +- ext/filter/tests/bug46973.phpt | 4 +- ext/filter/tests/bug47745.phpt | 11 + ext/gd/config.m4 | 16 +- ext/gd/config.w32 | 17 +- ext/gd/gd.c | 107 +- ext/gd/libgd/gd.c | 1096 +- ext/gd/libgd/gd.h | 5 + ext/gd/libgd/gd_arc.c | 110 + ext/gd/libgd/gd_color.c | 67 + ext/gd/libgd/gd_compat.c | 35 + ext/gd/libgd/gd_compat.h | 59 + ext/gd/libgd/gd_filter.c | 461 + ext/gd/libgd/gd_intern.h | 13 + ext/gd/libgd/gd_jpeg.c | 12 + ext/gd/libgd/gd_png.c | 30 +- ext/gd/libgd/gd_rotate.c | 557 + ext/gd/libgd/gd_topal.c | 56 - ext/gd/php_gd.h | 17 +- ext/gd/tests/gd_info_variation1.phpt | 2 +- ext/gettext/tests/gettext_basic-enus.phpt | 28 + .../gettext_bind_textdomain_codeset-retval.phpt | 22 + ...ettext_bind_textdomain_codeset-wrongparams.phpt | 23 + ext/gettext/tests/gettext_bindtextdomain-cwd.phpt | 27 + .../tests/gettext_bindtextdomain-emptydomain.phpt | 16 + ext/gettext/tests/gettext_bindtextdomain-path.phpt | 16 + .../tests/gettext_bindtextdomain-wrongparams.phpt | 19 + .../tests/gettext_dcgettext-wrongparams.phpt | 16 + ext/gettext/tests/gettext_dcgettext.phpt | 25 + ext/gettext/tests/gettext_dgettext.phpt | 30 + .../tests/gettext_dgettext_error_wrongparams.phpt | 34 + ext/gettext/tests/gettext_dngettext-plural.phpt | 24 + .../tests/gettext_dngettext-wrongparams.phpt | 23 + .../tests/gettext_gettext_error_wrongparams.phpt | 17 + .../tests/gettext_ngettext-wrongparams.phpt | 33 + ext/gettext/tests/gettext_ngettext.phpt | 26 + ext/gettext/tests/gettext_phpinfo.phpt | 19 + ext/gettext/tests/gettext_textdomain-retval.phpt | 29 + .../tests/gettext_textdomain-wrongparams.phpt | 25 + .../tests/locale/en/LC_CTYPE/dgettextTest.mo | Bin 0 -> 84 bytes .../tests/locale/en/LC_CTYPE/dgettextTest.po | 4 + .../locale/en/LC_CTYPE/dgettextTest_switch.mo | Bin 0 -> 102 bytes .../locale/en/LC_CTYPE/dgettextTest_switch.po | 4 + .../locale/en/LC_CTYPE/dgettextTest_switched.po | 2 + .../tests/locale/en/LC_CTYPE/dngettextTest.mo | Bin 0 -> 86 bytes .../tests/locale/en/LC_CTYPE/dngettextTest.po | 4 + .../tests/locale/en/LC_MESSAGES/dgettextTest.mo | Bin 0 -> 84 bytes .../tests/locale/en/LC_MESSAGES/dgettextTest.po | 4 + .../locale/en/LC_MESSAGES/dgettextTest_switch.mo | Bin 0 -> 102 bytes .../locale/en/LC_MESSAGES/dgettextTest_switch.po | 4 + .../tests/locale/en/LC_MESSAGES/dngettextTest.mo | Bin 0 -> 84 bytes .../tests/locale/en/LC_MESSAGES/dngettextTest.po | 4 + .../tests/locale/en/LC_MESSAGES/messages.mo | Bin 0 -> 201 bytes .../tests/locale/en/LC_MESSAGES/messages.po | 15 + ext/gmp/config.w32 | 6 +- ext/hash/hash.c | 21 +- ext/iconv/tests/iconv_basic.phpt | 72 + ext/iconv/tests/iconv_encoding_basic.phpt | 94 + ext/iconv/tests/iconv_get_encoding_error.phpt | 177 + .../iconv_mime_decode_headers_variation1.phpt | 218 + .../iconv_mime_decode_headers_variation2.phpt | 479 + .../iconv_mime_decode_headers_variation3.phpt | 482 + ext/iconv/tests/iconv_mime_decode_variation1.phpt | 183 + ext/iconv/tests/iconv_mime_decode_variation2.phpt | 195 + ext/iconv/tests/iconv_mime_decode_variation3.phpt | 222 + ext/iconv/tests/iconv_set_encoding_error.phpt | 177 + ext/iconv/tests/iconv_set_encoding_variation.phpt | 307 + ext/iconv/tests/iconv_stream_filter.phpt | 14 +- ext/iconv/tests/iconv_stream_filter_delimiter.phpt | 50 + ext/iconv/tests/iconv_strlen_basic.phpt | 40 + ext/iconv/tests/iconv_strlen_error1.phpt | 45 + ext/iconv/tests/iconv_strlen_error2.phpt | 34 + ext/iconv/tests/iconv_strlen_variation1.phpt | 193 + ext/iconv/tests/iconv_strlen_variation2.phpt | 204 + ext/iconv/tests/iconv_strpos_basic.phpt | 57 + ext/iconv/tests/iconv_strpos_error1.phpt | 50 + ext/iconv/tests/iconv_strpos_error2.phpt | 34 + ext/iconv/tests/iconv_strpos_variation1.phpt | 182 + ext/iconv/tests/iconv_strpos_variation2.phpt | 182 + ext/iconv/tests/iconv_strpos_variation3.phpt | 201 + ext/iconv/tests/iconv_strpos_variation3_64bit.phpt | 199 + ext/iconv/tests/iconv_strpos_variation4.phpt | 207 + ext/iconv/tests/iconv_strpos_variation5.phpt | 101 + ext/iconv/tests/iconv_strrpos_basic.phpt | 58 + ext/iconv/tests/iconv_strrpos_error1.phpt | 49 + ext/iconv/tests/iconv_strrpos_error2.phpt | 35 + ext/iconv/tests/iconv_strrpos_variation1.phpt | 180 + ext/iconv/tests/iconv_strrpos_variation2.phpt | 182 + ext/iconv/tests/iconv_strrpos_variation3.phpt | 205 + ext/iconv/tests/iconv_substr_basic.phpt | 55 + ext/iconv/tests/iconv_substr_error1.phpt | 50 + ext/iconv/tests/iconv_substr_error2.phpt | 36 + ext/imap/config.m4 | 20 +- ext/imap/config.w32 | 11 +- ext/imap/php_imap.c | 622 +- ext/imap/php_imap.h | 7 +- ext/imap/tests/clean.inc | 48 +- ext/imap/tests/imap_8bit_basic.phpt | 66 +- ext/imap/tests/imap_append_basic.phpt | 144 +- ext/imap/tests/imap_base64_basic.phpt | 90 +- ext/imap/tests/imap_body.phpt | 27 + ext/imap/tests/imap_body_basic.phpt | 86 +- ext/imap/tests/imap_clearflag_full_basic.phpt | 254 +- ext/imap/tests/imap_close_basic.phpt | 78 +- ext/imap/tests/imap_close_error.phpt | 34 +- ext/imap/tests/imap_close_variation1.phpt | 148 +- ext/imap/tests/imap_close_variation3.phpt | 56 +- ext/imap/tests/imap_createmailbox_basic.phpt | 136 +- ext/imap/tests/imap_errors_basic.phpt | 106 +- ext/imap/tests/imap_expunge_error.phpt | 27 + ext/imap/tests/imap_fetch_overview_error.phpt | 22 +- ext/imap/tests/imap_fetchbody_error.phpt | 26 +- ext/imap/tests/imap_fetchbody_variation1.phpt | 158 +- ext/imap/tests/imap_fetchheader_variation4.phpt | 52 +- ext/imap/tests/imap_gc_error.phpt | 28 + ext/imap/tests/imap_headers.phpt | 28 + ext/imap/tests/imap_mutf7_to_utf8.phpt | 23 + ext/imap/tests/imap_num_msg_error.phpt | 28 + ext/imap/tests/imap_num_recent_error.phpt | 27 + ext/imap/tests/imap_open_error.phpt | 42 + ext/imap/tests/imap_ping_error.phpt | 27 + ext/imap/tests/imap_utf8_to_mutf7_basic.phpt | 23 + ext/imap/tests/skipif.inc | 32 +- ext/interbase/php_ibase_udf.c | 4 +- ext/intl/collator/collator_locale.c | 2 +- ext/intl/formatter/formatter_format.c | 6 +- ext/intl/grapheme/grapheme_string.c | 7 +- ext/intl/idn/idn.c | 6 +- ext/intl/intl_data.h | 2 +- ext/intl/intl_error.c | 12 +- ext/intl/msgformat/msgformat_attr.c | 3 - ext/intl/tests/bug48227.phpt | 19 + ext/intl/tests/grapheme.phpt | 7 +- ext/json/CREDITS | 2 +- ext/json/JSON_parser.c | 10 +- ext/json/JSON_parser.h | 6 +- ext/json/json.c | 102 +- ext/json/php_json.h | 6 +- ext/json/tests/json_decode_basic.phpt | 187 + ext/json/tests/json_decode_error.phpt | 39 + ext/json/tests/json_encode_basic.phpt | 158 + ext/json/tests/json_encode_basic_utf8.phpt | 26 + ext/json/tests/json_encode_error.phpt | 40 + ext/ldap/ldap.c | 154 +- ext/ldap/tests/bug48441.phpt | 169 + ext/ldap/tests/connect.inc | 61 + ext/ldap/tests/skipifbindfailure.inc | 13 + ext/mbstring/config.m4 | 4 +- ext/mbstring/config.w32 | 6 +- ext/mbstring/mbstring.c | 345 +- ext/mbstring/php_mbregex.c | 6 +- .../tests/mb_convert_encoding_stateful.phpt | 37 + .../tests/mb_substitute_character_variation1.phpt | 6 - ext/mbstring/tests/zend_multibyte-02.phpt | 5 +- ext/mbstring/tests/zend_multibyte-03.phpt | 5 +- ext/mbstring/tests/zend_multibyte-04.phpt | 5 +- ext/mbstring/tests/zend_multibyte-05.phpt | 5 +- ext/mbstring/tests/zend_multibyte-06.phpt | 5 +- ext/mbstring/tests/zend_multibyte-07.phpt | 5 +- ext/mbstring/tests/zend_multibyte-08.phpt | 5 +- ext/mbstring/tests/zend_multibyte-09.phpt | 5 +- ext/mbstring/tests/zend_multibyte-10.phpt | 5 +- ext/mbstring/tests/zend_multibyte-11.phpt | 5 +- ext/mbstring/tests/zend_multibyte-12.phpt | 5 +- ext/mbstring/tests/zend_multibyte-13.phpt | 5 +- ext/mbstring/tests/zend_multibyte-14.phpt | 5 +- ext/mcrypt/mcrypt.c | 6 +- ext/mssql/php_mssql.c | 4 +- ext/mssql/php_mssql.h | 4 +- ext/mysql/php_mysql.c | 8 +- ext/mysql/tests/mysql_db_query.phpt | 6 +- ext/mysqli/config.m4 | 12 +- ext/mysqli/mysqli_api.c | 14 +- ext/mysqli/mysqli_mysqlnd.h | 2 + ext/mysqli/mysqli_prop.c | 31 +- ext/mysqli/php_mysqli_structs.h | 14 +- ext/mysqli/tests/002.phpt | 32 +- ext/mysqli/tests/003.phpt | 32 +- ext/mysqli/tests/004.phpt | 42 +- ext/mysqli/tests/005.phpt | 12 +- ext/mysqli/tests/009.phpt | 26 +- ext/mysqli/tests/010.phpt | 2 +- ext/mysqli/tests/011.phpt | 22 +- ext/mysqli/tests/012.phpt | 22 +- ext/mysqli/tests/014.phpt | 23 +- ext/mysqli/tests/015.phpt | 22 +- ext/mysqli/tests/016.phpt | 17 +- ext/mysqli/tests/017.phpt | 16 +- ext/mysqli/tests/019.phpt | 30 +- ext/mysqli/tests/020.phpt | 4 - ext/mysqli/tests/021.phpt | 12 +- ext/mysqli/tests/022.phpt | 10 +- ext/mysqli/tests/026.phpt | 12 +- ext/mysqli/tests/028.phpt | 9 +- ext/mysqli/tests/031.phpt | 8 +- ext/mysqli/tests/032.phpt | 5 +- ext/mysqli/tests/033.phpt | 9 +- ext/mysqli/tests/042.phpt | 44 +- ext/mysqli/tests/043.phpt | 6 - ext/mysqli/tests/045.phpt | 16 +- ext/mysqli/tests/047.phpt | 359 +- ext/mysqli/tests/048.phpt | 30 +- ext/mysqli/tests/049.phpt | 12 +- ext/mysqli/tests/056.phpt | 10 +- ext/mysqli/tests/057.phpt | 51 +- ext/mysqli/tests/058.phpt | 20 +- ext/mysqli/tests/059.phpt | 11 +- ext/mysqli/tests/060.phpt | 51 +- ext/mysqli/tests/061.phpt | 12 +- ext/mysqli/tests/062.phpt | 12 +- ext/mysqli/tests/063.phpt | 12 +- ext/mysqli/tests/065.phpt | 4 +- ext/mysqli/tests/068.phpt | 6 +- ext/mysqli/tests/069.phpt | 18 +- ext/mysqli/tests/072.phpt | 14 +- ext/mysqli/tests/073.phpt | 10 +- ext/mysqli/tests/074.phpt | 19 +- ext/mysqli/tests/bug34810.phpt | 116 +- ext/mysqli/tests/bug35517.phpt | 2 +- ext/mysqli/tests/bug44897.phpt | 10 +- ext/mysqli/tests/bug45019.phpt | 24 +- ext/mysqli/tests/bug45289.phpt | 31 + ext/mysqli/tests/bug47050.phpt | 3 + ext/mysqli/tests/local_infile_tools.inc | 4 +- ext/mysqli/tests/mysqli_affected_rows.phpt | 10 +- ext/mysqli/tests/mysqli_affected_rows_oo.phpt | 6 +- ext/mysqli/tests/mysqli_change_user_insert_id.phpt | 17 +- .../mysqli_change_user_prepared_statements.phpt | 2 +- ext/mysqli/tests/mysqli_change_user_set_names.phpt | 16 +- ext/mysqli/tests/mysqli_character_set.phpt | 15 +- .../mysqli_class_mysqli_driver_interface.phpt | 11 +- .../tests/mysqli_class_mysqli_interface.phpt | 91 +- .../mysqli_class_mysqli_result_interface.phpt | 43 +- .../tests/mysqli_class_mysqli_stmt_interface.phpt | 60 +- ext/mysqli/tests/mysqli_connect.phpt | 45 +- ext/mysqli/tests/mysqli_connect_oo_defaults.phpt | 52 +- ext/mysqli/tests/mysqli_connect_oo_warnings.phpt | 12 +- ext/mysqli/tests/mysqli_connect_twice.phpt | 24 +- ext/mysqli/tests/mysqli_constants.phpt | 22 +- ext/mysqli/tests/mysqli_debug_ini.phpt | 5 +- ext/mysqli/tests/mysqli_error_unicode.phpt | 16 +- ext/mysqli/tests/mysqli_fetch_all.phpt | 233 +- ext/mysqli/tests/mysqli_fetch_all_oo.phpt | 231 +- ext/mysqli/tests/mysqli_fetch_array.phpt | 156 +- ext/mysqli/tests/mysqli_fetch_array_assoc.phpt | 32 +- ext/mysqli/tests/mysqli_fetch_array_oo.phpt | 156 +- ext/mysqli/tests/mysqli_fetch_assoc.phpt | 96 +- ext/mysqli/tests/mysqli_fetch_assoc_no_alias.phpt | 98 +- .../tests/mysqli_fetch_assoc_no_alias_utf8.phpt | 204 +- ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt | 52 +- ext/mysqli/tests/mysqli_fetch_field.phpt | 181 +- ext/mysqli/tests/mysqli_fetch_field_direct.phpt | 65 +- ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt | 65 +- ext/mysqli/tests/mysqli_fetch_field_oo.phpt | 122 +- ext/mysqli/tests/mysqli_fetch_field_types.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_fields.phpt | 118 +- .../tests/mysqli_fetch_object_no_constructor.phpt | 19 +- ext/mysqli/tests/mysqli_fetch_row.phpt | 22 +- ext/mysqli/tests/mysqli_field_count.phpt | 2 +- ext/mysqli/tests/mysqli_field_seek.phpt | 252 +- ext/mysqli/tests/mysqli_field_tell.phpt | 78 +- ext/mysqli/tests/mysqli_fork.phpt | 14 - ext/mysqli/tests/mysqli_get_cache_stats.phpt | 35 +- .../mysqli_get_cache_stats_free_buffered.phpt | 3 - ext/mysqli/tests/mysqli_get_charset.phpt | 6 +- ext/mysqli/tests/mysqli_get_client_stats.phpt | 733 +- ext/mysqli/tests/mysqli_info.phpt | 12 +- ext/mysqli/tests/mysqli_kill.phpt | 90 +- ext/mysqli/tests/mysqli_options.phpt | 6 +- ext/mysqli/tests/mysqli_pconn_disabled.phpt | 4 +- ext/mysqli/tests/mysqli_pconn_kill.phpt | 4 +- ext/mysqli/tests/mysqli_pconn_limits.phpt | 11 +- ext/mysqli/tests/mysqli_pconn_max_links.phpt | 68 +- ext/mysqli/tests/mysqli_pconn_reuse.phpt | 4 +- ext/mysqli/tests/mysqli_poll_kill.phpt | 6 +- .../tests/mysqli_poll_mixing_insert_select.phpt | 12 +- ext/mysqli/tests/mysqli_poll_reference.phpt | 17 +- ext/mysqli/tests/mysqli_prepare.phpt | 6 +- ext/mysqli/tests/mysqli_query.phpt | 33 +- ext/mysqli/tests/mysqli_query_stored_proc.phpt | 74 +- ext/mysqli/tests/mysqli_query_unicode.phpt | 18 +- ext/mysqli/tests/mysqli_real_connect.phpt | 40 +- .../tests/mysqli_real_escape_string_big5.phpt | 4 +- .../tests/mysqli_real_escape_string_eucjpms.phpt | 4 +- .../tests/mysqli_real_escape_string_euckr.phpt | 4 +- .../tests/mysqli_real_escape_string_gb2312.phpt | 4 +- .../tests/mysqli_real_escape_string_gbk.phpt | 10 +- .../mysqli_real_escape_string_nobackslash.phpt | 12 +- .../tests/mysqli_real_escape_string_sjis.phpt | 9 +- ext/mysqli/tests/mysqli_real_query.phpt | 20 +- ext/mysqli/tests/mysqli_report.phpt | 2 +- ext/mysqli/tests/mysqli_result_references.phpt | 126 +- .../tests/mysqli_result_references_mysqlnd.phpt | 93 +- ext/mysqli/tests/mysqli_set_charset.phpt | 6 +- .../tests/mysqli_set_local_infile_handler.phpt | 61 +- ...li_set_local_infile_handler_replace_buffer.phpt | 2 +- ...li_set_opt_numeric_and_datetime_as_unicode.phpt | 11 +- ext/mysqli/tests/mysqli_stmt_affected_rows.phpt | 17 +- ext/mysqli/tests/mysqli_stmt_attr_set.phpt | 2 +- .../mysqli_stmt_bind_param_call_user_func.phpt | 54 +- .../mysqli_stmt_bind_param_type_juggling.phpt | 2 - ext/mysqli/tests/mysqli_stmt_bind_result.phpt | 14 +- ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt | 2 - .../tests/mysqli_stmt_bind_result_references.phpt | 125 +- ext/mysqli/tests/mysqli_stmt_datatype_change.phpt | 32 +- ext/mysqli/tests/mysqli_stmt_execute.phpt | 43 +- .../tests/mysqli_stmt_execute_stored_proc.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_field_count.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_get_result.phpt | 34 +- ext/mysqli/tests/mysqli_stmt_get_result2.phpt | 33 +- .../tests/mysqli_stmt_get_result_metadata.phpt | 32 +- .../tests/mysqli_stmt_get_result_non_select.phpt | 2 - ext/mysqli/tests/mysqli_stmt_get_result_types.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_result_metadata.phpt | 63 +- .../mysqli_stmt_result_metadata_sqltests.phpt | 6 +- ext/mysqli/tests/mysqli_stmt_send_long_data.phpt | 6 +- ...i_stmt_send_long_data_packet_size_libmysql.phpt | 2 +- ...li_stmt_send_long_data_packet_size_mysqlnd.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_store_result.phpt | 2 +- ext/mysqli/tests/skipifunicode.inc | 4 +- ext/mysqli/tests/table.inc | 2 +- ext/mysqlnd/mysqlnd.c | 8 +- ext/mysqlnd/mysqlnd.h | 12 +- ext/mysqlnd/mysqlnd_block_alloc.c | 23 +- ext/mysqlnd/mysqlnd_block_alloc.h | 5 +- ext/mysqlnd/mysqlnd_charset.c | 3 +- ext/mysqlnd/mysqlnd_debug.c | 23 +- ext/mysqlnd/mysqlnd_debug.h | 4 +- ext/mysqlnd/mysqlnd_enum_n_def.h | 11 +- ext/mysqlnd/mysqlnd_libmysql_compat.h | 2 + ext/mysqlnd/mysqlnd_palloc.c | 120 +- ext/mysqlnd/mysqlnd_portability.h | 5 + ext/mysqlnd/mysqlnd_ps.c | 81 +- ext/mysqlnd/mysqlnd_ps_codec.c | 8 +- ext/mysqlnd/mysqlnd_result.c | 198 +- ext/mysqlnd/mysqlnd_result_meta.c | 69 +- ext/mysqlnd/mysqlnd_statistics.c | 34 +- ext/mysqlnd/mysqlnd_statistics.h | 121 +- ext/mysqlnd/mysqlnd_structs.h | 8 +- ext/mysqlnd/mysqlnd_wireprotocol.c | 45 +- ext/mysqlnd/php_mysqlnd.c | 24 +- ext/oci8/package.xml | 899 +- ext/oci8/package2.xml | 627 - ext/oci8/tests/bind_long.phpt | 4 +- ext/oci8/tests/test.txt | 16 +- ext/odbc/birdstep.c | 4 +- ext/odbc/php_odbc.c | 67 +- ext/odbc/tests/config.inc | 8 + ext/odbc/tests/odbc_columnprivileges_001.phpt | 28 + ext/odbc/tests/odbc_columns_001.phpt | 32 + ext/odbc/tests/odbc_data_source_001.phpt | 25 + ext/odbc/tests/odbc_exec_001.phpt | 40 + ext/odbc/tests/odbc_exec_002.phpt | 36 + ext/odbc/tests/odbc_free_result_001.phpt | 50 + ext/odbc/tests/odbc_tables_001.phpt | 29 + ext/odbc/tests/skipif.inc | 10 + ext/openssl/openssl.c | 9 +- ext/openssl/tests/bug47828.phpt | 40 + ext/pcntl/pcntl.c | 88 +- ext/pcntl/tests/001.phpt | 2 +- ext/pcntl/tests/002.phpt | 3 +- ext/pcntl/tests/003.phpt | 32 + ext/pcntl/tests/bug47566.phpt | 19 + ext/pcntl/tests/signal_closure_handler.phpt | 1 - ext/pcre/pcrelib/AUTHORS | 2 +- ext/pcre/pcrelib/ChangeLog | 122 + ext/pcre/pcrelib/LICENCE | 2 +- ext/pcre/pcrelib/NEWS | 5 + ext/pcre/pcrelib/NON-UNIX-USE | 13 +- ext/pcre/pcrelib/README | 27 +- ext/pcre/pcrelib/config.h | 16 +- ext/pcre/pcrelib/dftables.c | 2 +- ext/pcre/pcrelib/doc/pcre.txt | 1894 +- ext/pcre/pcrelib/pcre.h | 9 +- ext/pcre/pcrelib/pcre_compile.c | 861 +- ext/pcre/pcrelib/pcre_config.c | 4 +- ext/pcre/pcrelib/pcre_exec.c | 233 +- ext/pcre/pcrelib/pcre_fullinfo.c | 2 +- ext/pcre/pcrelib/pcre_get.c | 2 +- ext/pcre/pcrelib/pcre_globals.c | 2 +- ext/pcre/pcrelib/pcre_info.c | 2 +- ext/pcre/pcrelib/pcre_internal.h | 588 +- ext/pcre/pcrelib/pcre_maketables.c | 2 +- ext/pcre/pcrelib/pcre_newline.c | 6 +- ext/pcre/pcrelib/pcre_ord2utf8.c | 2 +- ext/pcre/pcrelib/pcre_printint.src | 6 +- ext/pcre/pcrelib/pcre_refcount.c | 2 +- ext/pcre/pcrelib/pcre_study.c | 2 +- ext/pcre/pcrelib/pcre_tables.c | 358 +- ext/pcre/pcrelib/pcre_try_flipped.c | 2 +- ext/pcre/pcrelib/pcre_valid_utf8.c | 4 +- ext/pcre/pcrelib/pcre_version.c | 2 +- ext/pcre/pcrelib/pcre_xclass.c | 7 +- ext/pcre/pcrelib/pcreposix.c | 1 + ext/pcre/pcrelib/pcreposix.h | 1 + ext/pcre/pcrelib/testdata/grepinputx | 1 + ext/pcre/pcrelib/testdata/grepoutput | 27 +- ext/pcre/pcrelib/testdata/testinput1 | 25 + ext/pcre/pcrelib/testdata/testinput2 | 47 + ext/pcre/pcrelib/testdata/testinput5 | 5 + ext/pcre/pcrelib/testdata/testinput6 | 8 + ext/pcre/pcrelib/testdata/testinput7 | 33 +- ext/pcre/pcrelib/testdata/testoutput1 | 37 + ext/pcre/pcrelib/testdata/testoutput2 | 202 + ext/pcre/pcrelib/testdata/testoutput5 | 11 + ext/pcre/pcrelib/testdata/testoutput6 | 10 + ext/pcre/pcrelib/testdata/testoutput7 | 120 +- ext/pcre/pcrelib/ucp.h | 5 +- ext/pcre/php_pcre.c | 6 +- ext/pcre/tests/bug33200.phpt | 3 +- ext/pcre/tests/bug47229.phpt | 10 +- ext/pcre/tests/bug47662.phpt | 18 + ext/pcre/tests/invalid_utf8_offset.phpt | 6 +- ext/pdo/pdo_dbh.c | 24 +- ext/pdo/pdo_stmt.c | 157 +- ext/pdo/tests/bug47769.phpt | 32 + ext/pdo/tests/bug_44173.phpt | 78 + ext/pdo/tests/bug_44409.phpt | 51 + ext/pdo/tests/bug_44861.phpt | 104 + ext/pdo_dblib/config.w32 | 10 +- ext/pdo_dblib/pdo_dblib.c | 10 +- ext/pdo_dblib/php_pdo_dblib.h | 8 +- ext/pdo_firebird/config.m4 | 14 +- ext/pdo_firebird/firebird_driver.c | 5 +- ext/pdo_mysql/mysql_statement.c | 33 +- .../tests/pdo_mysql_stmt_fetch_serialize.phpt | 1 - .../pdo_mysql_stmt_fetch_serialize_simple.phpt | 3 - ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt | 2 +- ext/pdo_oci/oci_driver.c | 12 +- ext/pdo_oci/tests/bug46274.phpt | 71 + ext/pdo_oci/tests/bug46274_2.phpt | 77 + ext/pdo_odbc/config.w32 | 4 +- ext/pdo_odbc/odbc_stmt.c | 6 +- ext/pdo_pgsql/config.m4 | 23 +- ext/pdo_pgsql/config.w32 | 7 +- ext/pdo_pgsql/pdo_pgsql.c | 9 +- ext/pdo_pgsql/pgsql_driver.c | 43 +- ext/pdo_pgsql/pgsql_statement.c | 188 +- ext/pdo_pgsql/php_pdo_pgsql_int.h | 8 +- ext/pdo_pgsql/tests/bug46274_2.phpt | 16 +- ext/pdo_sqlite/sqlite_statement.c | 20 +- ext/pdo_sqlite/tests/bug43831.phpt | 2 + ext/pdo_sqlite/tests/bug46542.phpt | 6 +- .../tests/pdo_sqlite_createaggregate.phpt | 2 + .../tests/pdo_sqlite_createfunction.phpt | 2 + ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt | 2 + ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt | 2 + ext/pgsql/config.w32 | 4 +- ext/pgsql/pgsql.c | 4 +- ext/pgsql/tests/80_bug14383.phpt | 15 + ext/phar/config.w32 | 4 +- ext/phar/func_interceptors.c | 5 +- ext/phar/phar.c | 43 +- ext/phar/phar/pharcommand.inc | 11 +- ext/phar/phar_internal.h | 23 +- ext/phar/phar_object.c | 69 +- ext/phar/tar.c | 55 +- ext/phar/tests/fatal_error_webphar.phpt | 18 + ext/phar/tests/files/pear2coverage.phar.php | Bin 0 -> 55262 bytes ext/phar/tests/phar_construct_invalidurl.phpt | 30 + ext/phar/tests/phar_oo_010.phpt | 4 +- ext/phar/tests/phar_oo_011.phpt | 8 +- ext/phar/tests/phpinfo_001.phpt | 4 +- ext/phar/tests/phpinfo_002.phpt | 2 +- ext/phar/tests/phpinfo_003.phpt | 2 +- ext/phar/tests/phpinfo_004.phpt | 6 +- ext/phar/tests/tar/bignames_overflow.phpt | 40 + ext/phar/tests/tar/files/Net_URL-1.0.15.tgz | Bin 0 -> 6303 bytes .../tests/tar/files/make.dangerous.tar.php.inc | 170 + ext/phar/tests/tar/phar_convert_phar.phpt | 2 +- ext/phar/tests/tar/phar_convert_phar4.phpt | 71 + ext/phar/tests/tar/require_hash.phpt | 1 + ext/phar/tests/tar/tar_nohash.phpt | 23 + ext/phar/util.c | 8 +- ext/phar/zip.c | 22 +- ext/posix/posix.c | 6 +- ext/posix/tests/posix_access.phpt | 51 + ext/posix/tests/posix_access_error_modes.phpt | 45 + .../tests/posix_access_error_wrongparams.phpt | 43 + ext/posix/tests/posix_access_safemode.phpt | 24 + ext/posix/tests/posix_ctermid.phpt | 26 + ext/posix/tests/posix_getcwd_basic.phpt | 22 + ext/posix/tests/posix_getgrgid.phpt | 45 + ext/posix/tests/posix_getgrgid_basic.phpt | 30 + ext/posix/tests/posix_getgrgid_macosx.phpt | 23 + ext/posix/tests/posix_getgrgid_wrongparams.phpt | 28 + ext/posix/tests/posix_getgrnam_basic.phpt | 23 + ext/posix/tests/posix_getgroups_basic.phpt | 24 + ext/posix/tests/posix_getpgid_basic.phpt | 23 + ext/posix/tests/posix_getpgrp_basic.phpt | 21 + ext/posix/tests/posix_getpid_basic.phpt | 21 + ext/posix/tests/posix_getppid_basic.phpt | 21 + ext/posix/tests/posix_getpwnam_basic.phpt | 23 + ext/posix/tests/posix_getpwuid_basic.phpt | 30 + ext/posix/tests/posix_getrlimit_basic.phpt | 20 + ext/posix/tests/posix_getsid.phpt | 28 + ext/posix/tests/posix_getsid_basic.phpt | 22 + ext/posix/tests/posix_getsid_error.phpt | 28 + ext/posix/tests/posix_initgroups_basic.phpt | 22 + ext/posix/tests/posix_kill_basic.phpt | 39 + ext/posix/tests/posix_mkfifo_safemode.phpt | 44 + ext/posix/tests/posix_mkfifo_wrongparams.phpt | 21 + ext/posix/tests/posix_mknod_basic.phpt | 18 + ext/posix/tests/posix_times.phpt | 33 + ext/posix/tests/posix_times_basic.phpt | 37 + ext/posix/tests/posix_ttyname.phpt | 26 + .../tests/posix_ttyname_error_wrongparams.phpt | 37 + ext/posix/tests/posix_uname.phpt | 33 + ext/posix/tests/posix_uname_basic.phpt | 28 + ext/readline/config.m4 | 11 +- ext/reflection/php_reflection.c | 41 +- ext/reflection/tests/002.phpt | 14 +- .../tests/ReflectionClass_FileInfo_basic.phpt | 33 + .../tests/ReflectionClass_FileInfo_error.phpt | 37 + .../tests/ReflectionClass_constructor_001.phpt | 33 + .../tests/ReflectionClass_constructor_002.phpt | 67 + .../tests/ReflectionClass_export_basic1.phpt | 62 + .../tests/ReflectionClass_export_basic2.phpt | 54 + .../tests/ReflectionClass_getConstant_basic.phpt | 41 + .../tests/ReflectionClass_getConstant_error.phpt | 37 + .../tests/ReflectionClass_getConstants_basic.phpt | 48 + .../tests/ReflectionClass_getConstants_error.phpt | 24 + .../ReflectionClass_getConstructor_basic.phpt | 82 + .../ReflectionClass_getConstructor_error.phpt | 23 + .../ReflectionClass_getExtensionName_basic.phpt | 14 + ...ReflectionClass_getExtensionName_variation.phpt | 18 + .../tests/ReflectionClass_getExtension_basic.phpt | 17 + .../ReflectionClass_getExtension_variation.phpt | 18 + .../ReflectionClass_getInterfaceNames_basic.phpt | 23 + .../tests/ReflectionClass_getMethod_001.phpt | 146 +- .../tests/ReflectionClass_getMethods_001.phpt | 98 +- .../ReflectionClass_getModifierNames_basic.phpt | 139 + .../tests/ReflectionClass_getModifiers_basic.phpt | 37 + .../tests/ReflectionClass_getName_basic.phpt | 25 + .../tests/ReflectionClass_getName_error.phpt | 16 + .../tests/ReflectionClass_getName_error1.phpt | 8 + .../tests/ReflectionClass_getNamespaceName.phpt | 30 + .../tests/ReflectionClass_getParentClass.phpt | 21 + .../tests/ReflectionClass_getProperties_001.phpt | 82 +- .../tests/ReflectionClass_getProperty_001.phpt | 90 +- .../tests/ReflectionClass_getProperty_003.phpt | 152 +- .../tests/ReflectionClass_getProperty_004.phpt | 152 +- .../tests/ReflectionClass_hasConstant_basic.phpt | 23 + .../tests/ReflectionClass_hasMethod_basic.phpt | 57 + .../tests/ReflectionClass_hasProperty_basic.phpt | 38 + .../tests/ReflectionClass_isAbstract_basic.phpt | 21 + .../tests/ReflectionClass_isFinal_basic.phpt | 21 + .../tests/ReflectionClass_isInstance_basic.phpt | 51 + .../tests/ReflectionClass_isInstance_error.phpt | 39 + .../ReflectionClass_isInstantiable_basic.phpt | 40 + .../ReflectionClass_isInstantiable_error.phpt | 19 + .../ReflectionClass_isInstantiable_variation.phpt | 50 + .../tests/ReflectionClass_isInterface_basic.phpt | 25 + .../tests/ReflectionClass_isInternal_basic.phpt | 22 + .../tests/ReflectionClass_isInternal_error.phpt | 14 + .../tests/ReflectionClass_isIterateable_basic.phpt | 34 + .../ReflectionClass_isIterateable_variation1.phpt | 25 + .../tests/ReflectionClass_isSubclassOf_basic.phpt | 103 + .../tests/ReflectionClass_isSubclassOf_error.phpt | 17 + .../tests/ReflectionClass_isSubclassOf_error1.phpt | 16 + .../tests/ReflectionClass_isUserDefined_basic.phpt | 22 + .../tests/ReflectionClass_isUserDefined_error.phpt | 14 + .../ReflectionExtension_constructor_basic.phpt | 15 + .../ReflectionExtension_constructor_error.phpt | 16 + .../tests/ReflectionExtension_export_basic.phpt | 22 + .../ReflectionExtension_getClassNames_basic.phpt | 20 + ...flectionExtension_getClassNames_variation1.phpt | 14 + .../ReflectionExtension_getClasses_basic.phpt | 69 + .../ReflectionExtension_getDependencies_basic.phpt | 22 + ...ectionExtension_getDependencies_variation2.phpt | 16 + .../tests/ReflectionExtension_getName_basic.phpt | 14 + .../ReflectionExtension_getVersion_basic.phpt | 16 + .../tests/ReflectionExtension_info_basic.phpt | 19 + .../tests/ReflectionMethod_getModifiers_basic.phpt | 34 +- .../tests/ReflectionObject_FileInfo_basic.phpt | 25 + .../tests/ReflectionObject_FileInfo_error.phpt | 37 + .../tests/ReflectionObject___toString_basic1.phpt | 36 + .../tests/ReflectionObject___toString_basic2.phpt | 39 + .../tests/ReflectionObject_constructor_basic.phpt | 28 + .../tests/ReflectionObject_constructor_error.phpt | 49 + .../tests/ReflectionObject_export_basic1.phpt | 36 + .../tests/ReflectionObject_export_basic2.phpt | 39 + .../tests/ReflectionObject_export_basic3.phpt | 38 + .../tests/ReflectionObject_getConstant_basic.phpt | 41 + .../tests/ReflectionObject_getConstant_error.phpt | 34 + .../tests/ReflectionObject_getConstants_basic.phpt | 49 + .../tests/ReflectionObject_getConstants_error.phpt | 17 + .../ReflectionObject_getConstructor_basic.phpt | 82 + .../ReflectionObject_getConstructor_error.phpt | 23 + .../tests/ReflectionObject_getName_basic.phpt | 27 + .../tests/ReflectionObject_getName_error.phpt | 23 + .../tests/ReflectionObject_getName_error1.phpt | 8 + .../tests/ReflectionObject_isInstance_basic.phpt | 33 + .../tests/ReflectionObject_isInstance_error.phpt | 38 + .../ReflectionObject_isInstantiable_basic.phpt | 36 + .../ReflectionObject_isInstantiable_error.phpt | 22 + .../ReflectionObject_isInstantiable_variation.phpt | 78 + .../tests/ReflectionObject_isInternal_basic.phpt | 23 + .../tests/ReflectionObject_isInternal_error.phpt | 15 + .../tests/ReflectionObject_isSubclassOf_basic.phpt | 116 + .../tests/ReflectionObject_isSubclassOf_error.phpt | 24 + .../ReflectionObject_isUserDefined_basic.phpt | 23 + .../ReflectionObject_isUserDefined_error.phpt | 15 + .../tests/ReflectionParameter_export_basic.phpt | 19 + .../tests/ReflectionParameter_export_error.phpt | 21 + .../tests/ReflectionParameter_export_error2.phpt | 31 + .../tests/ReflectionParameter_export_error3.phpt | 22 + ...ectionParameter_getDeclaringFunction_basic.phpt | 37 + .../ReflectionParameter_getPosition_basic.phpt | 21 + ...ectionParameter_invalidMethodInConstructor.phpt | 31 + .../tests/ReflectionParameter_toString_basic.phpt | 20 + .../tests/ReflectionProperty_basic1.phpt | 160 + .../tests/ReflectionProperty_basic2.phpt | 103 + .../ReflectionProperty_constructor_error.phpt | 44 + .../ReflectionProperty_constructor_variation1.phpt | 58 + ext/reflection/tests/ReflectionProperty_error.phpt | 67 + .../tests/ReflectionProperty_export_basic.phpt | 16 + .../tests/ReflectionProperty_export_error.phpt | 54 + ...ctionProperty_getDeclaringClass_variation1.phpt | 27 + .../ReflectionProperty_getDocComment_basic.phpt | 100 + .../ReflectionProperty_getDocComment_error.phpt | 28 + .../ReflectionProperty_getModifiers_basic.phpt | 46 + .../tests/ReflectionProperty_getValue_error.phpt | 81 + .../tests/ReflectionProperty_isDefault_basic.phpt | 63 + .../tests/ReflectionProperty_setAccessible.phpt | 139 + .../tests/ReflectionProperty_setValue_error.phpt | 100 + ext/reflection/tests/bug48336.phpt | 44 + .../tests/reflectionClass_FileInfo_basic.phpt | 33 - .../tests/reflectionClass_FileInfo_error.phpt | 37 - .../tests/reflectionClass_constructor_001.phpt | 33 - .../tests/reflectionClass_constructor_002.phpt | 67 - .../tests/reflectionClass_export_basic1.phpt | 62 - .../tests/reflectionClass_export_basic2.phpt | 54 - .../tests/reflectionClass_getConstant_basic.phpt | 41 - .../tests/reflectionClass_getConstant_error.phpt | 37 - .../tests/reflectionClass_getConstants_basic.phpt | 48 - .../tests/reflectionClass_getConstants_error.phpt | 24 - .../reflectionClass_getConstructor_basic.phpt | 82 - .../reflectionClass_getConstructor_error.phpt | 23 - .../reflectionClass_getExtensionName_basic.phpt | 14 - ...reflectionClass_getExtensionName_variation.phpt | 18 - .../tests/reflectionClass_getExtension_basic.phpt | 17 - .../reflectionClass_getExtension_variation.phpt | 18 - .../reflectionClass_getInterfaceNames_basic.phpt | 23 - .../reflectionClass_getModifierNames_basic.phpt | 139 - .../tests/reflectionClass_getModifiers_basic.phpt | 37 - .../tests/reflectionClass_getName_basic.phpt | 25 - .../tests/reflectionClass_getName_error.phpt | 16 - .../tests/reflectionClass_getName_error1.phpt | 8 - .../tests/reflectionClass_getNamespaceName.phpt | 30 - .../tests/reflectionClass_getParentClass.phpt | 21 - .../tests/reflectionClass_hasConstant_basic.phpt | 23 - .../tests/reflectionClass_hasMethod_basic.phpt | 57 - .../tests/reflectionClass_hasProperty_basic.phpt | 38 - .../tests/reflectionClass_isAbstract_basic.phpt | 21 - .../tests/reflectionClass_isFinal_basic.phpt | 21 - .../tests/reflectionClass_isInstance_basic.phpt | 51 - .../tests/reflectionClass_isInstance_error.phpt | 39 - .../reflectionClass_isInstantiable_basic.phpt | 40 - .../reflectionClass_isInstantiable_error.phpt | 19 - .../reflectionClass_isInstantiable_variation.phpt | 50 - .../tests/reflectionClass_isInterface_basic.phpt | 25 - .../tests/reflectionClass_isInternal_basic.phpt | 22 - .../tests/reflectionClass_isInternal_error.phpt | 14 - .../tests/reflectionClass_isIterateable_basic.phpt | 34 - .../reflectionClass_isIterateable_variation1.phpt | 25 - .../tests/reflectionClass_isSubclassOf_basic.phpt | 103 - .../tests/reflectionClass_isSubclassOf_error.phpt | 17 - .../tests/reflectionClass_isSubclassOf_error1.phpt | 16 - .../tests/reflectionClass_isUserDefined_basic.phpt | 22 - .../tests/reflectionClass_isUserDefined_error.phpt | 14 - .../reflectionExtension_constructor_basic.phpt | 15 - .../reflectionExtension_constructor_error.phpt | 16 - .../tests/reflectionExtension_export_basic.phpt | 22 - .../reflectionExtension_getClassNames_basic.phpt | 20 - ...flectionExtension_getClassNames_variation1.phpt | 14 - .../reflectionExtension_getClasses_basic.phpt | 69 - .../reflectionExtension_getDependencies_basic.phpt | 22 - ...ectionExtension_getDependencies_variation2.phpt | 16 - .../tests/reflectionExtension_getName_basic.phpt | 14 - .../reflectionExtension_getVersion_basic.phpt | 16 - .../tests/reflectionExtension_info_basic.phpt | 19 - .../tests/reflectionObject_FileInfo_basic.phpt | 25 - .../tests/reflectionObject_FileInfo_error.phpt | 37 - .../tests/reflectionObject___toString_basic1.phpt | 36 - .../tests/reflectionObject___toString_basic2.phpt | 39 - .../tests/reflectionObject_constructor_basic.phpt | 28 - .../tests/reflectionObject_constructor_error.phpt | 49 - .../tests/reflectionObject_export_basic1.phpt | 36 - .../tests/reflectionObject_export_basic2.phpt | 39 - .../tests/reflectionObject_export_basic3.phpt | 38 - .../tests/reflectionObject_getConstant_basic.phpt | 41 - .../tests/reflectionObject_getConstant_error.phpt | 34 - .../tests/reflectionObject_getConstants_basic.phpt | 49 - .../tests/reflectionObject_getConstants_error.phpt | 17 - .../reflectionObject_getConstructor_basic.phpt | 82 - .../reflectionObject_getConstructor_error.phpt | 23 - .../tests/reflectionObject_getName_basic.phpt | 27 - .../tests/reflectionObject_getName_error.phpt | 23 - .../tests/reflectionObject_getName_error1.phpt | 8 - .../tests/reflectionObject_isInstance_basic.phpt | 33 - .../tests/reflectionObject_isInstance_error.phpt | 38 - .../reflectionObject_isInstantiable_basic.phpt | 36 - .../reflectionObject_isInstantiable_error.phpt | 22 - .../reflectionObject_isInstantiable_variation.phpt | 78 - .../tests/reflectionObject_isInternal_basic.phpt | 23 - .../tests/reflectionObject_isInternal_error.phpt | 15 - .../tests/reflectionObject_isSubclassOf_basic.phpt | 116 - .../tests/reflectionObject_isSubclassOf_error.phpt | 24 - .../reflectionObject_isUserDefined_basic.phpt | 23 - .../reflectionObject_isUserDefined_error.phpt | 15 - .../tests/reflectionParameter_export_basic.phpt | 19 - .../tests/reflectionParameter_export_error.phpt | 21 - .../tests/reflectionParameter_export_error2.phpt | 31 - .../tests/reflectionParameter_export_error3.phpt | 22 - ...ectionParameter_getDeclaringFunction_basic.phpt | 37 - .../reflectionParameter_getPosition_basic.phpt | 21 - ...ectionParameter_invalidMethodInConstructor.phpt | 31 - .../tests/reflectionParameter_toString_basic.phpt | 20 - .../tests/reflectionProperty_basic1.phpt | 160 - .../tests/reflectionProperty_basic2.phpt | 103 - .../reflectionProperty_constructor_error.phpt | 44 - .../reflectionProperty_constructor_variation1.phpt | 58 - ext/reflection/tests/reflectionProperty_error.phpt | 67 - .../tests/reflectionProperty_export_basic.phpt | 16 - .../tests/reflectionProperty_export_error.phpt | 54 - ...ctionProperty_getDeclaringClass_variation1.phpt | 27 - .../reflectionProperty_getDocComment_basic.phpt | 100 - .../reflectionProperty_getDocComment_error.phpt | 28 - .../reflectionProperty_getModifiers_basic.phpt | 46 - .../tests/reflectionProperty_getValue_error.phpt | 81 - .../tests/reflectionProperty_isDefault_basic.phpt | 63 - .../tests/reflectionProperty_setAccessible.phpt | 82 - .../tests/reflectionProperty_setValue_error.phpt | 100 - ext/session/mod_files.c | 61 +- ext/session/mod_mm.c | 127 +- ext/session/mod_user.c | 76 +- ext/session/php_session.h | 22 +- ext/session/session.c | 158 +- ext/session/tests/001.phpt | 2 + ext/session/tests/003.phpt | 2 + ext/session/tests/004.phpt | 1 + ext/session/tests/005.phpt | 2 + ext/session/tests/006.phpt | 2 + ext/session/tests/007.phpt | 3 + ext/session/tests/008-php4.2.3.phpt | 2 + ext/session/tests/009.phpt | 2 + ext/session/tests/012.phpt | 2 + ext/session/tests/013.phpt | 1 + ext/session/tests/014.phpt | 1 + ext/session/tests/019.phpt | 3 + ext/session/tests/bug42596.phpt | 33 + ext/shmop/shmop.c | 4 +- ext/simplexml/simplexml.c | 5 +- ext/snmp/snmp.c | 29 +- ext/soap/config.w32 | 7 +- ext/soap/php_encoding.c | 4 +- ext/soap/php_http.c | 7 +- ext/soap/tests/bug48557.phpt | 71 + ext/soap/tests/bug48557.wsdl | 31 + .../tests/interop/Round2/Base/r2_base_005p.phpt | 1 + .../tests/interop/Round2/Base/r2_base_005s.phpt | 1 + .../tests/interop/Round2/Base/r2_base_005w.phpt | 1 + ext/sockets/sockets.c | 12 +- ext/sockets/tests/ipv6_skipif.inc | 8 + ext/sockets/tests/ipv6loop.phpt | 4 +- ext/sockets/tests/socket_accept-wrongparams.phpt | 16 + ext/sockets/tests/socket_create_listen-nobind.phpt | 25 + .../tests/socket_create_listen-wrongparams.phpt | 18 + ext/sockets/tests/socket_create_listen.phpt | 18 + .../tests/socket_create_pair-wrongparams.phpt | 41 + ext/sockets/tests/socket_create_pair.phpt | 24 + ext/sockets/tests/socket_listen-wrongparams.phpt | 21 + ext/sockets/tests/socket_select-wrongparams-1.phpt | 27 + ext/sockets/tests/socket_select-wrongparams-2.phpt | 23 + ext/sockets/tests/socket_select-wrongparams-3.phpt | 28 + ext/sockets/tests/socket_select-wrongparams-4.phpt | 29 + ext/sockets/tests/socket_select.phpt | 25 + .../tests/socket_sentto_recvfrom_ipv4_udp.phpt | 57 + .../tests/socket_sentto_recvfrom_ipv6_udp.phpt | 58 + ext/sockets/tests/socket_sentto_recvfrom_unix.phpt | 55 + ext/sockets/tests/socket_set_block-retval.phpt | 28 + .../tests/socket_set_block-wrongparams.phpt | 18 + ext/sockets/tests/socket_set_nonblock-retval.phpt | 28 + .../tests/socket_set_nonblock-wrongparams.phpt | 13 + .../socket_set_option_error_socket_option.phpt | 33 + ext/sockets/tests/socket_set_option_rcvtimeo.phpt | 39 + ext/sockets/tests/socket_set_option_seolinger.phpt | 47 + ext/sockets/tests/socket_set_option_sndtimeo.phpt | 39 + ext/spl/internal/appenditerator.inc | 2 +- ext/spl/internal/cachingiterator.inc | 312 +- ext/spl/internal/emptyiterator.inc | 122 +- ext/spl/internal/filteriterator.inc | 236 +- ext/spl/internal/infiniteiterator.inc | 94 +- ext/spl/internal/iteratoriterator.inc | 242 +- ext/spl/internal/limititerator.inc | 250 +- ext/spl/internal/multipleiterator.inc | 2 +- ext/spl/internal/norewinditerator.inc | 54 +- ext/spl/internal/outeriterator.inc | 32 +- ext/spl/internal/parentiterator.inc | 46 +- ext/spl/internal/recursivearrayiterator.inc | 116 +- ext/spl/internal/recursivecachingiterator.inc | 180 +- ext/spl/internal/recursivefilteriterator.inc | 122 +- ext/spl/internal/recursiveiterator.inc | 42 +- ext/spl/internal/recursiveiteratoriterator.inc | 472 +- ext/spl/internal/recursiveregexiterator.inc | 104 +- ext/spl/internal/recursivetreeiterator.inc | 2 +- ext/spl/internal/regexiterator.inc | 310 +- ext/spl/internal/seekableiterator.inc | 78 +- ext/spl/internal/spldoublylinkedlist.inc | 2 +- ext/spl/internal/splfileobject.inc | 754 +- ext/spl/internal/splobjectstorage.inc | 358 +- ext/spl/internal/splqueue.inc | 2 +- ext/spl/internal/splstack.inc | 2 +- ext/spl/php_spl.c | 24 +- ext/spl/spl_array.c | 10 +- ext/spl/spl_directory.c | 45 +- ext/spl/spl_directory.h | 3 +- ext/spl/spl_dllist.c | 14 +- ext/spl/spl_fixedarray.c | 23 +- ext/spl/spl_iterators.c | 26 +- .../DirectoryIterator_getBasename_basic_test.phpt | 23 + .../DirectoryIterator_getBasename_pass_array.phpt | 23 + ext/spl/tests/SplArray_fromArray.phpt | 17 + .../SplDoublyLinkedList_bottom_pass_array.phpt | 14 + .../SplDoublyLinkedList_bottom_pass_float.phpt | 14 + .../SplDoublyLinkedList_bottom_pass_integer.phpt | 14 + .../SplDoublyLinkedList_bottom_pass_null.phpt | 14 + ext/spl/tests/SplDoublyLinkedList_count.phpt | 12 + ...LinkedList_count_param_SplDoublyLinkedList.phpt | 11 + ext/spl/tests/SplDoublyLinkedList_current.phpt | 11 + .../tests/SplDoublyLinkedList_current_empty.phpt | 13 + ext/spl/tests/SplDoublyLinkedList_debug-info.phpt | 29 + .../tests/SplDoublyLinkedList_getIteratorMode.phpt | 12 + .../SplDoublyLinkedList_getIteratorMode_error.phpt | 12 + ...blyLinkedList_isEmpty_empty-with-parameter.phpt | 14 + .../tests/SplDoublyLinkedList_isEmpty_empty.phpt | 13 + ...inkedList_isEmpty_not-empty-with-parameter.phpt | 20 + .../SplDoublyLinkedList_isEmpty_not-empty.phpt | 19 + ext/spl/tests/SplDoublyLinkedList_lifoMode.phpt | 23 + ...yLinkedList_offsetExists_invalid_parameter.phpt | 15 + .../SplDoublyLinkedList_offsetExists_success.phpt | 31 + .../tests/SplDoublyLinkedList_offsetGet_empty.phpt | 14 + ...plDoublyLinkedList_offsetGet_missing_param.phpt | 15 + .../SplDoublyLinkedList_offsetGet_param_array.phpt | 18 + ...SplDoublyLinkedList_offsetGet_param_string.phpt | 18 + ...ublyLinkedList_offsetSet_invalid_parameter.phpt | 15 + ...LinkedList_offsetSet_one_invalid_parameter.phpt | 15 + ...nkedList_offsetUnset_greater_than_elements.phpt | 27 + ...yLinkedList_offsetUnset_negative-parameter.phpt | 23 + ..._offsetUnset_parameter-larger-num-elements.phpt | 23 + .../tests/SplDoublyLinkedList_pop_noParams.phpt | 15 + ext/spl/tests/SplDoublyLinkedList_pop_params.phpt | 14 + ...SplDoublyLinkedList_push_missing_parameter.phpt | 13 + ..._setIteratorMode_param_SplDoublyLinkedList.phpt | 11 + .../tests/SplDoublyLinkedList_shift_noParams.phpt | 15 + .../tests/SplDoublyLinkedList_top_pass_array.phpt | 14 + .../tests/SplDoublyLinkedList_top_pass_float.phpt | 14 + .../SplDoublyLinkedList_top_pass_integer.phpt | 14 + .../tests/SplDoublyLinkedList_top_pass_null.phpt | 14 + ...DoublyLinkedList_unshift_missing_parameter.phpt | 13 + .../SplDoublylinkedlist_offsetunset_first.phpt | 25 + .../SplDoublylinkedlist_offsetunset_first002.phpt | 17 + .../SplDoublylinkedlist_offsetunset_last.phpt | 25 + ext/spl/tests/SplFileObject_fflush_basic_001.phpt | 35 + ext/spl/tests/SplFileObject_fpassthru_basic.phpt | 13 + ext/spl/tests/SplFileObject_fscanf_basic.phpt | 12 + ext/spl/tests/SplFileObject_fseek_error_001.phpt | 12 + .../tests/SplFileObject_ftruncate_error_001.phpt | 29 + ext/spl/tests/SplFileObject_fwrite_error_001.phpt | 12 + .../tests/SplFileObject_fwrite_variation_001.phpt | 17 + .../tests/SplFileObject_fwrite_variation_002.phpt | 17 + .../tests/SplFileObject_fwrite_variation_003.phpt | 18 + .../SplFileObject_getCsvControl_basic_001.phpt | 15 + ext/spl/tests/SplFileObject_seek_error_001.phpt | 19 + ext/spl/tests/SplFileObject_testinput.csv | 5 + .../SplFixedArray__construct_param_array.phpt | 12 + .../SplFixedArray__construct_param_float.phpt | 14 + .../tests/SplFixedArray__construct_param_null.phpt | 16 + .../SplFixedArray__construct_param_string.phpt | 12 + ...plFixedArray_construct_param_SplFixedArray.phpt | 13 + ext/spl/tests/SplFixedArray_count_checkParams.phpt | 16 + ext/spl/tests/SplFixedArray_count_param_int.phpt | 11 + ext/spl/tests/SplFixedArray_current_param.phpt | 24 + ...FixedArray_fromArray_invalid_parameter_001.phpt | 10 + ...FixedArray_fromArray_invalid_parameter_002.phpt | 10 + ext/spl/tests/SplFixedArray_fromarray_indexes.phpt | 22 + .../tests/SplFixedArray_fromarray_non_indexes.phpt | 21 + .../SplFixedArray_fromarray_param_boolean.phpt | 10 + .../SplFixedArray_fromarray_param_multiarray.phpt | 17 + .../tests/SplFixedArray_getSize_pass_param.phpt | 12 + ext/spl/tests/SplFixedArray_key_param.phpt | 24 + ext/spl/tests/SplFixedArray_key_setsize.phpt | 20 + ext/spl/tests/SplFixedArray_next_param.phpt | 18 + ...lFixedArray_offsetExists_invalid_parameter.phpt | 15 + .../SplFixedArray_offsetExists_less_than_zero.phpt | 13 + .../SplFixedArray_offsetGet_invalid_parameter.phpt | 16 + .../SplFixedArray_offsetSet_invalid_parameter.phpt | 15 + ...FixedArray_offsetSet_one_invalid_parameter.phpt | 15 + ...plFixedArray_offsetUnset_invalid_parameter.phpt | 15 + .../tests/SplFixedArray_offsetUnset_string.phpt | 33 + ext/spl/tests/SplFixedArray_rewind_param.phpt | 18 + .../SplFixedArray_setSize_filled_to_smaller.phpt | 22 + .../tests/SplFixedArray_setSize_param_array.phpt | 18 + .../tests/SplFixedArray_setSize_param_float.phpt | 19 + .../tests/SplFixedArray_setSize_param_null.phpt | 13 + ext/spl/tests/SplFixedArray_setSize_reduce.phpt | 22 + ext/spl/tests/SplFixedArray_setsize_001.phpt | 22 + ext/spl/tests/SplFixedArray_setsize_grow.phpt | 30 + ext/spl/tests/SplFixedArray_setsize_shrink.phpt | 28 + .../tests/SplFixedArray_toArray_with-params.phpt | 19 + .../tests/SplFixedarray_offsetExists_larger.phpt | 15 + ext/spl/tests/SplHeap_count_invalid_parameter.phpt | 47 + .../tests/SplHeap_extract_invalid_parameter.phpt | 47 + .../tests/SplHeap_insert_invalid_parameter.phpt | 16 + ext/spl/tests/SplHeap_isEmpty.phpt | 15 + .../tests/SplHeap_isEmpty_invalid_parameter.phpt | 47 + .../SplObjectStorage_addAll_invalid_parameter.phpt | 43 + .../SplObjectStorage_attach_invalid_parameter.phpt | 20 + ...plObjectStorage_contains_invalid_parameter.phpt | 43 + .../SplObjectStorage_current_empty_storage.phpt | 15 + .../SplObjectStorage_detach_invalid_parameter.phpt | 43 + .../SplObjectStorage_getInfo_empty_storage.phpt | 15 + ext/spl/tests/SplObjectStorage_offsetGet.phpt | 17 + ...lObjectStorage_offsetGet_invalid_parameter.phpt | 45 + .../SplObjectStorage_offsetGet_missing_object.phpt | 20 + ...lObjectStorage_removeAll_invalid_parameter.phpt | 43 + .../SplObjectStorage_setInfo_empty_storage.phpt | 15 + ...SplObjectStorage_setInfo_invalid_parameter.phpt | 16 + ...jectStorage_unserialize_invalid_parameter1.phpt | 27 + ...jectStorage_unserialize_invalid_parameter2.phpt | 34 + ...jectStorage_unserialize_invalid_parameter3.phpt | 19 + ...SplPriorityQueue_extract_invalid_parameter.phpt | 47 + .../SplPriorityQueue_insert_invalid_parameter.phpt | 16 + ext/spl/tests/SplQueue_setIteratorMode.phpt | 15 + .../tests/SplQueue_setIteratorMode_param_lifo.phpt | 19 + ext/spl/tests/SplStack_setIteratorMode.phpt | 15 + ext/spl/tests/arrayObject_magicMethods6.phpt | 3 - ext/spl/tests/bug38325.phpt | 4 +- ext/spl/tests/bug45622b.phpt | 33 + ext/spl/tests/bug47534.phpt | 14 + ext/spl/tests/bug48023.phpt | 12 + ext/spl/tests/bug48493.phpt | 26 + ext/spl/tests/dit_003.phpt | 2 +- ext/spl/tests/dllist_010.phpt | 33 + ext/spl/tests/dllist_011.phpt | 13 + ext/spl/tests/dllist_memleak.phpt | 24 + ext/spl/tests/heap_corruption.phpt | 62 + ext/spl/tests/heap_current_variation_001.phpt | 22 + ext/spl/tests/heap_isempty_variation_001.phpt | 16 + ext/spl/tests/heap_it_current_empty.phpt | 12 + ext/spl/tests/heap_top_variation_001.phpt | 14 + ext/spl/tests/heap_top_variation_002.phpt | 31 + ext/spl/tests/heap_top_variation_003.phpt | 16 + ext/spl/tests/iterator_count.phpt | 26 + ext/spl/tests/iterator_to_array.phpt | 25 + ext/spl/tests/limititerator_seek.phpt | 18 + ext/spl/tests/pqueue_compare_basic.phpt | 19 + ext/spl/tests/pqueue_compare_error.phpt | 19 + ext/spl/tests/pqueue_current_error.phpt | 12 + .../recursive_tree_iterator_setprefixpart.phpt | 32 + ...rsiveiteratoriterator_beginiteration_basic.phpt | 32 + ...cursiveiteratoriterator_enditeration_basic.phpt | 32 + ...rsiveiteratoriterator_getsubiterator_basic.phpt | 20 + ...rsiveiteratoriterator_getsubiterator_error.phpt | 15 + ...eiteratoriterator_getsubiterator_variation.phpt | 42 + ...ratoriterator_getsubiterator_variation_002.phpt | 20 + ...ratoriterator_getsubiterator_variation_003.phpt | 42 + ...ecursiveiteratoriterator_nextelement_basic.phpt | 39 + ext/spl/tests/regexiterator_getpregflags.phpt | 33 + .../tests/regexiterator_setflags_exception.phpt | 35 + ext/spl/tests/regexiterator_setpregflags.phpt | 34 + .../regexiterator_setpregflags_exception.phpt | 36 + ext/spl/tests/spl_autoload_bug48541.phpt | 24 + .../spl_caching_iterator_constructor_flags.phpt | 25 + .../spl_cachingiterator___toString_basic.phpt | 16 + .../tests/spl_cachingiterator_setFlags_basic.phpt | 16 + ext/spl/tests/spl_classes.phpt | 13 + .../tests/spl_fileinfo_getlinktarget_basic.phpt | 22 + ext/spl/tests/spl_heap_count_basic.phpt | 35 + ext/spl/tests/spl_heap_count_error.phpt | 12 + .../tests/spl_heap_extract_parameter_error.phpt | 27 + ext/spl/tests/spl_heap_insert_basic.phpt | 20 + ext/spl/tests/spl_heap_is_empty_basic.phpt | 31 + ext/spl/tests/spl_heap_isempty.phpt | 21 + ext/spl/tests/spl_heap_iteration_error.phpt | 53 + .../spl_heap_recoverfromcorruption_arguments.phpt | 15 + ext/spl/tests/spl_iterator_apply_error.phpt | 26 + ext/spl/tests/spl_iterator_apply_error_001.phpt | 20 + .../tests/spl_iterator_caching_count_basic.phpt | 21 + .../tests/spl_iterator_caching_count_error.phpt | 21 + .../tests/spl_iterator_caching_getcache_error.phpt | 21 + ext/spl/tests/spl_iterator_getcallchildren.phpt | 39 + .../tests/spl_iterator_iterator_constructor.phpt | 30 + .../spl_iterator_recursive_getiterator_error.phpt | 16 + ext/spl/tests/spl_iterator_to_array_basic.phpt | 13 + ext/spl/tests/spl_iterator_to_array_error.phpt | 33 + ext/spl/tests/spl_limit_iterator_check_limits.phpt | 37 + ext/spl/tests/spl_maxheap_compare_basic.phpt | 22 + ext/spl/tests/spl_minheap_compare_error.phpt | 31 + ext/spl/tests/spl_pq_top_basic.phpt | 42 + ext/spl/tests/spl_pq_top_error_args.phpt | 12 + ext/spl/tests/spl_pq_top_error_corrupt.phpt | 37 + ext/spl/tests/spl_pq_top_error_empty.phpt | 19 + .../spl_priorityqeue_insert_two_params_error.phpt | 31 + ...eratorIterator_setMaxDepth_parameter_count.phpt | 28 + .../spl_recursive_iterator_iterator_key_case.phpt | 33 + ext/spl/tests/splpriorityqueue_extract.phpt | 19 + .../tests/splpriorityqueue_setextractflags.phpt | 17 + ext/sqlite/libsqlite/src/date.c | 2 +- ext/sqlite3/config.w32 | 4 +- ext/sqlite3/config0.m4 | 7 +- ext/sqlite3/libsqlite/sqlite3.c | 22021 ++-- ext/sqlite3/libsqlite/sqlite3.h | 2505 +- ext/sqlite3/libsqlite/sqlite3ext.h | 2 +- ext/sqlite3/php_sqlite3_structs.h | 3 +- ext/sqlite3/sqlite3.c | 171 +- ext/sqlite3/tests/sqlite3_02_open.phpt | 19 + ext/sqlite3/tests/sqlite3_21_security.phpt | 6 +- ext/sqlite3/tests/sqlite3_31_changes.phpt | 20 + ext/sqlite3/tests/sqlite3_31_open.phpt | 22 + ext/sqlite3/tests/sqlite3_32_changes.phpt | 17 + .../sqlite3_32_createAggregate_paramCount.phpt | 21 + .../tests/sqlite3_32_last_insert_rowid_param.phpt | 40 + .../sqlite3_33_createAggregate_notcallable.phpt | 29 + .../tests/sqlite3_33_load_extension_param.phpt | 23 + ext/sqlite3/tests/sqlite3_33_reset.phpt | 27 + .../tests/sqlite3_34_load_extension_ext_dir.phpt | 21 + ext/sqlite3/tests/sqlite3_close_error.phpt | 21 + ext/sqlite3/tests/sqlite3_close_with_params.phpt | 18 + ext/sqlite3/tests/sqlite3_enable_exceptions.phpt | 36 + ext/sqlite3/tests/sqlite3_exec_wrongparams.phpt | 16 + .../tests/sqlite3_lasterrorcode_with_params.phpt | 18 + .../tests/sqlite3_lasterrormsg_with_params.phpt | 17 + .../sqlite3_loadextension_with_wrong_param.phpt | 18 + ext/sqlite3/tests/sqlite3_open_empty_string.phpt | 19 + .../tests/sqlite3_openblob_wrongparams.phpt | 79 + ext/sqlite3/tests/sqlite3_prepare_faultystmt.phpt | 20 + .../tests/sqlite3_prepare_with_empty_string.phpt | 16 + ext/sqlite3/tests/sqlite3_prepare_wrongparams.phpt | 19 + .../sqlite3_prepared_stmt_clear_with_params.phpt | 34 + ext/sqlite3/tests/sqlite3_query_error.phpt | 32 + ext/sqlite3/tests/sqlite3_querysingle_error.phpt | 31 + ext/sqlite3/tests/sqlite3_version_noparam.phpt | 16 + ...te3result_fetcharray_with_two_params_fails.phpt | 20 + .../tests/sqlite3result_numcolumns_error.phpt | 33 + .../sqlite3result_reset_with_params_fails.phpt | 19 + ext/sqlite3/tests/sqlite3stmt_reset_params.phpt | 47 + ext/standard/CREDITS | 3 - ext/standard/array.c | 10 +- ext/standard/assert.c | 4 +- ext/standard/basic_functions.c | 23 +- ext/standard/browscap.c | 4 +- ext/standard/credits_ext.h | 6 +- ext/standard/crypt_blowfish.c | 4 +- ext/standard/dns.c | 9 +- ext/standard/dns.h | 5 +- ext/standard/dns_win32.c | 3 +- ext/standard/exec.c | 15 +- ext/standard/file.c | 168 +- ext/standard/filters.c | 217 +- ext/standard/head.c | 6 +- ext/standard/http_fopen_wrapper.c | 93 +- ext/standard/link_win32.c | 29 +- ext/standard/mail.c | 4 +- ext/standard/microtime.c | 5 +- ext/standard/pack.c | 9 +- ext/standard/php_string.h | 4 +- ext/standard/proc_open.c | 12 +- ext/standard/scanf.c | 4 +- ext/standard/streamsfuncs.c | 11 +- ext/standard/string.c | 38 +- ext/standard/strnatcmp.c | 6 +- .../tests/array/array_fill_variation1.phpt | 4 +- .../tests/array/array_key_exists_object1.phpt | 22 +- .../tests/array/array_key_exists_object2.phpt | 22 +- .../tests/array/array_multisort_variation11.phpt | 21 + ext/standard/tests/array/array_push_error2.phpt | 23 +- .../tests/array/array_slice_variation2.phpt | 12 +- .../tests/array/array_slice_variation3.phpt | 2 + .../tests/array/array_unique_variation2.phpt | 76 +- .../tests/array/array_unique_variation6.phpt | 2 +- ext/standard/tests/array/array_walk_object1.phpt | Bin 1391 -> 1441 bytes ext/standard/tests/array/array_walk_objects.phpt | Bin 798 -> 937 bytes .../tests/array/array_walk_rec_objects.phpt | Bin 858 -> 997 bytes .../tests/array/array_walk_recursive_object1.phpt | Bin 1441 -> 1491 bytes ext/standard/tests/array/bug44929.phpt | 31 + ext/standard/tests/array/bug48224.phpt | 15 + ext/standard/tests/array/count_recursive.phpt | 1 - ext/standard/tests/array/end.phpt | 3 +- ext/standard/tests/class_object/AutoInterface.inc | 5 + ext/standard/tests/class_object/AutoLoaded.inc | 5 + ext/standard/tests/class_object/AutoTest.inc | 13 + .../tests/class_object/get_class_vars_error.phpt | 38 + .../class_object/get_class_vars_variation1.phpt | 181 + .../class_object/get_class_vars_variation2.phpt | 168 + .../get_declared_classes_variation1.phpt | 37 + .../get_declared_interfaces_variation1.phpt | 37 + .../tests/class_object/interface_exists_error.phpt | 38 + .../class_object/interface_exists_variation1.phpt | 184 + .../class_object/interface_exists_variation2.phpt | 204 + .../class_object/interface_exists_variation3.phpt | 35 + .../class_object/interface_exists_variation4.phpt | 27 + .../class_object/is_subclass_of_variation_004.phpt | 175 + .../tests/class_object/property_exists_error.phpt | 47 + .../class_object/property_exists_variation1.phpt | 33 + ext/standard/tests/dir/dir_variation8.phpt | 9 - ext/standard/tests/file/005_variation.phpt | 28 +- ext/standard/tests/file/007_variation15.phpt | 6 +- ext/standard/tests/file/007_variation23.phpt | 6 +- ext/standard/tests/file/007_variation7.phpt | 6 +- ext/standard/tests/file/bug27508.phpt | 11 +- ext/standard/tests/file/bug41874.phpt | 15 + ext/standard/tests/file/bug41874_1.phpt | 16 + ext/standard/tests/file/bug41874_2.phpt | 17 + ext/standard/tests/file/bug41874_3.phpt | 16 + ext/standard/tests/file/bug44034.phpt | 39 + ext/standard/tests/file/bug46347.phpt | 6 +- ext/standard/tests/file/bug47767.phpt | 45 + ext/standard/tests/file/copy_variation12.phpt | 1 - ext/standard/tests/file/fgetcsv_variation14.phpt | 30 +- ext/standard/tests/file/fgetcsv_variation21.phpt | 30 +- .../tests/file/file_get_contents_basic.phpt | 6 - .../tests/file/file_get_contents_error.phpt | 11 +- .../tests/file/file_get_contents_variation5.phpt | 14 +- .../tests/file/file_get_contents_variation9.phpt | 8 +- .../tests/file/file_put_contents_variation2.phpt | 4 +- ext/standard/tests/file/filetype_variation2.phpt | 3 +- ext/standard/tests/file/fscanf_variation51.phpt | 4 +- ext/standard/tests/file/fscanf_variation52.phpt | 4 +- ext/standard/tests/file/fscanf_variation53.phpt | 4 +- ext/standard/tests/file/fwrite_variation5.phpt | 2 +- ext/standard/tests/file/include_streams.phpt | 6 +- ext/standard/tests/file/is_dir_variation1.phpt | 1 - ext/standard/tests/file/is_dir_variation2.phpt | 24 +- ext/standard/tests/file/is_file_error.phpt | 8 +- ext/standard/tests/file/link_win32.phpt | 26 + .../tests/file/mkdir_rmdir_variation2.phpt | 1 - .../tests/file/parse_ini_file_variation4.phpt | 16 +- ext/standard/tests/file/pathinfo_basic.phpt | 508 +- ext/standard/tests/file/pathinfo_basic1.phpt | 837 +- ext/standard/tests/file/pathinfo_basic2.phpt | 353 +- ext/standard/tests/file/proc_open01.phpt | 6 +- .../tests/file/readlink_realpath_variation3.phpt | 9 - ext/standard/tests/file/rename_basic.phpt | 1 - ext/standard/tests/file/rename_variation.phpt | 7 - ext/standard/tests/file/rename_variation1.phpt | 2 - ext/standard/tests/file/rename_variation2.phpt | 6 +- ext/standard/tests/file/rename_variation3.phpt | 4 - ext/standard/tests/file/rename_variation4.phpt | 3 - ext/standard/tests/file/rename_variation8.phpt | 1 - .../file/symlink_link_linkinfo_is_link_basic2.phpt | 1 - .../symlink_link_linkinfo_is_link_variation6.phpt | 4 + ext/standard/tests/file/unlink_error.phpt | 2 +- ext/standard/tests/file/windows_acls/bug44859.phpt | 62 + .../tests/file/windows_acls/bug44859_2.phpt | 62 + .../tests/file/windows_acls/bug44859_3.phpt | 36 + .../tests/file/windows_acls/bug44859_4.phpt | 64 + ext/standard/tests/file/windows_acls/common.inc | 176 + ext/standard/tests/file/windows_acls/tiny.bat | 1 + ext/standard/tests/file/windows_acls/tiny.exe | Bin 0 -> 133 bytes ext/standard/tests/filters/chunked_001.phpt | 33 + ext/standard/tests/filters/filter_errors.inc | 3 + ext/standard/tests/general_functions/bug41037.phpt | 3 - .../tests/general_functions/bug44394_2.phpt | 1 - ext/standard/tests/general_functions/bug47857.phpt | 23 + ext/standard/tests/general_functions/bug47859.phpt | 42 + .../tests/general_functions/call_user_method.phpt | 20 + .../tests/general_functions/closures_002.phpt | 3 - .../gettype_settype_variation2.phpt | 12 +- ext/standard/tests/general_functions/intval.phpt | 4 +- .../tests/general_functions/intval_variation1.phpt | 203 + .../tests/general_functions/intval_variation2.phpt | 195 + ext/standard/tests/general_functions/is_array.phpt | 4 +- ext/standard/tests/general_functions/is_bool.phpt | 3 +- .../general_functions/is_callable_basic2.phpt | 48 - ext/standard/tests/general_functions/is_float.phpt | 3 +- ext/standard/tests/general_functions/is_int.phpt | 3 +- ext/standard/tests/general_functions/is_null.phpt | 3 +- .../tests/general_functions/is_numeric.phpt | 3 +- .../tests/general_functions/is_object.phpt | 3 +- .../tests/general_functions/is_scalar.phpt | 3 +- .../tests/general_functions/is_string.phpt | 3 +- .../tests/general_functions/putenv_error1.phpt | 2 + .../tests/general_functions/putenv_error2.phpt | 2 + ext/standard/tests/general_functions/strval.phpt | 3 +- ext/standard/tests/http/bug38802.phpt | 172 + ext/standard/tests/http/ignore_errors.phpt | 124 + ext/standard/tests/http/server.inc | 92 + .../tests/mail/ezmlm_hash_basic_64bit.phpt | 4 +- ext/standard/tests/mail/mail_basic2.phpt | 8 +- ext/standard/tests/mail/mail_variation2.phpt | 4 +- ext/standard/tests/math/abs_basiclong_64bit.phpt | 60 + ext/standard/tests/math/acos_basiclong_64bit.phpt | 60 + ext/standard/tests/math/acosh_basiclong_64bit.phpt | 60 + ext/standard/tests/math/asin_basiclong_64bit.phpt | 60 + ext/standard/tests/math/asinh_basiclong_64bit.phpt | 60 + ext/standard/tests/math/atan2_basiclong_64bit.phpt | 364 + ext/standard/tests/math/atan_basiclong_64bit.phpt | 60 + ext/standard/tests/math/atanh_basiclong_64bit.phpt | 60 + .../tests/math/bindec_basiclong_64bit.phpt | 51 + ext/standard/tests/math/ceil_basiclong_64bit.phpt | 60 + ext/standard/tests/math/cos_basiclong_64bit.phpt | 60 + ext/standard/tests/math/cosh_basiclong_64bit.phpt | 60 + .../tests/math/decbin_basiclong_64bit.phpt | 60 + ext/standard/tests/math/decbin_variation1.phpt | 4 +- .../tests/math/decbin_variation1_64bit.phpt | 4 +- .../tests/math/dechex_basiclong_64bit.phpt | 60 + ext/standard/tests/math/dechex_variation1.phpt | 4 +- .../tests/math/dechex_variation1_64bit.phpt | 4 +- .../tests/math/decoct_basiclong_64bit.phpt | 60 + ext/standard/tests/math/decoct_variation1.phpt | 4 +- .../tests/math/decoct_variation1_64bit.phpt | 4 +- .../tests/math/deg2rad_basiclong_64bit.phpt | 60 + ext/standard/tests/math/exp_basiclong_64bit.phpt | 60 + ext/standard/tests/math/expm1_basiclong_64bit.phpt | 60 + ext/standard/tests/math/floor_basiclong_64bit.phpt | 60 + ext/standard/tests/math/fmod_basiclong_64bit.phpt | 364 + .../tests/math/hexdec_basiclong_64bit.phpt | 51 + ext/standard/tests/math/hypot_basiclong_64bit.phpt | 364 + .../tests/math/is_finite_basiclong_64bit.phpt | 60 + .../tests/math/is_infinite_basiclong_64bit.phpt | 60 + .../tests/math/is_nan_basiclong_64bit.phpt | 60 + ext/standard/tests/math/log10_basiclong_64bit.phpt | 60 + ext/standard/tests/math/log1p_basiclong_64bit.phpt | 60 + ext/standard/tests/math/log_basiclong_64bit.phpt | 60 + .../tests/math/octdec_basiclong_64bit.phpt | 51 + ext/standard/tests/math/pow_basic.phpt | 41 +- ext/standard/tests/math/pow_basic_64bit.phpt | 35 +- ext/standard/tests/math/pow_basiclong_64bit.phpt | 364 + .../tests/math/rad2deg_basiclong_64bit.phpt | 60 + ext/standard/tests/math/round_basiclong_64bit.phpt | 60 + ext/standard/tests/math/sin_basiclong_64bit.phpt | 60 + ext/standard/tests/math/sinh_basiclong_64bit.phpt | 60 + ext/standard/tests/math/sqrt_basiclong_64bit.phpt | 60 + ext/standard/tests/math/tan_basiclong_64bit.phpt | 60 + ext/standard/tests/math/tanh_basiclong_64bit.phpt | 60 + ext/standard/tests/misc/browsernames.inc | 51 + ext/standard/tests/misc/browsernames.php | 51 - ext/standard/tests/misc/get_browser_basic.phpt | 4 +- ext/standard/tests/misc/get_browser_error.phpt | 2 +- .../tests/misc/get_browser_variation1.phpt | 2 +- .../tests/misc/syslog_vars_variation1.phpt | 1 + ext/standard/tests/misc/time_nanosleep_basic.phpt | 23 + ext/standard/tests/misc/time_nanosleep_error1.phpt | 14 + ext/standard/tests/misc/time_nanosleep_error2.phpt | 14 + ext/standard/tests/misc/time_nanosleep_error3.phpt | 17 + ext/standard/tests/misc/time_nanosleep_error4.phpt | 17 + ext/standard/tests/misc/time_nanosleep_error5.phpt | 14 + ext/standard/tests/network/bug20134.phpt | 2 +- .../define_syslog_variables_variation-win32.phpt | 1 + .../network/define_syslog_variables_variation.phpt | 1 + .../tests/network/gethostbyname_basic001.phpt | 10 + .../tests/network/gethostbyname_basic002.phpt | 11 + .../tests/network/gethostbyname_error001.phpt | 10 + .../tests/network/gethostbyname_error002.phpt | 10 + .../tests/network/gethostbyname_error003.phpt | 10 + .../tests/network/gethostbyname_error004.phpt | 11 + .../tests/network/gethostbyname_error005.phpt | 12 + .../tests/network/gethostbyname_error006.phpt | 10 + ext/standard/tests/network/inet.phpt | 42 +- ext/standard/tests/network/ip2long_variation1.phpt | 14 +- ext/standard/tests/serialize/bug43614.phpt | 2 +- ext/standard/tests/streams/bug46426.phpt | 2 +- ext/standard/tests/streams/bug47997.phpt | 13 + ext/standard/tests/streams/bug48309.phpt | 33 + .../streams/stream_copy_to_stream_socket.phpt | 30 + .../tests/streams/stream_get_contents_001.phpt | 2 +- ext/standard/tests/strings/bug38770.phpt | 2 +- ext/standard/tests/strings/bug40754.phpt | 4 +- ext/standard/tests/strings/bug40915.phpt | Bin 347 -> 377 bytes ext/standard/tests/strings/bug44703.phpt | 24 +- ext/standard/tests/strings/bug47546.phpt | 24 - .../tests/strings/chunk_split_variation2.phpt | 4 +- ext/standard/tests/strings/explode.phpt | 16 +- ext/standard/tests/strings/explode1.phpt | 36 +- ext/standard/tests/strings/explode_variation5.phpt | 4 +- ext/standard/tests/strings/explode_variation6.phpt | 1 - ext/standard/tests/strings/highlight_file.phpt | 2 +- ext/standard/tests/strings/htmlentities01.phpt | 4 +- .../htmlspecialchars_decode_variation2.phpt | 2 +- ext/standard/tests/strings/pack.phpt | 10 +- .../tests/strings/sprintf_variation35.phpt | 20 +- ext/standard/tests/strings/sprintf_variation4.phpt | 18 +- .../tests/strings/sprintf_variation41.phpt | 18 +- ext/standard/tests/strings/str_getcsv_001.phpt | 4 +- .../tests/strings/str_split_variation2.phpt | 7 +- ext/standard/tests/strings/strcoll.phpt | 21 + ext/standard/tests/strings/strcoll_error.phpt | 44 + ext/standard/tests/strings/strstr.phpt | Bin 10353 -> 10343 bytes ext/standard/tests/strings/vfprintf_error1.phpt | 2 +- ext/standard/tests/strings/vfprintf_error2.phpt | 2 +- ext/standard/tests/strings/vfprintf_error3.phpt | 2 +- ext/standard/tests/strings/vfprintf_error4.phpt | 2 +- .../tests/strings/vfprintf_variation15.phpt | 4 +- .../tests/strings/vfprintf_variation16.phpt | 4 +- .../tests/strings/vfprintf_variation4.phpt | 2 +- .../tests/strings/vprintf_variation15.phpt | 4 +- .../tests/strings/vprintf_variation15_64bit.phpt | 4 +- .../tests/strings/vprintf_variation16.phpt | 4 +- ext/standard/tests/strings/vprintf_variation4.phpt | 4 +- .../tests/strings/vsprintf_variation15.phpt | 2 +- .../tests/strings/vsprintf_variation15_64bit.phpt | 2 +- .../tests/strings/vsprintf_variation16.phpt | 4 +- .../tests/strings/vsprintf_variation4.phpt | 4 +- ext/standard/tests/url/bug47174.phpt | 4 +- .../tests/url/parse_url_variation_002.phpt | 182 - .../tests/url/parse_url_variation_002_32bit.phpt | 200 + .../tests/url/parse_url_variation_002_64bit.phpt | 184 + ext/standard/tests/versioning/php_sapi_name.phpt | 9 + .../versioning/php_sapi_name_variation001.phpt | 14 + ext/standard/type.c | 18 +- ext/standard/uuencode.c | 6 +- ext/standard/var_unserializer.c | 4 +- ext/standard/var_unserializer.c.orig | 4 +- ext/sysvshm/sysvshm.c | 4 +- ext/sysvshm/tests/002.phpt | 10 +- ext/tokenizer/tokenizer.c | 7 +- ext/wddx/tests/bug48562.phpt | 22 + ext/wddx/wddx.c | 18 +- ext/xmlrpc/config.m4 | 24 +- ext/xmlrpc/tests/bug44996.phpt | 49 + ext/xmlrpc/tests/bug47818.phpt | 39 + ext/xmlrpc/xmlrpc-epi-php.c | 11 +- ext/xmlwriter/php_xmlwriter.c | 36 +- ext/xmlwriter/tests/bug48204.phpt | 17 + .../tests/xmlwriter_open_uri_error_001.phpt | 16 + .../tests/xmlwriter_open_uri_error_002.phpt | 16 + .../tests/xmlwriter_open_uri_error_003.phpt | 16 + .../tests/xmlwriter_open_uri_error_004.phpt | 16 + .../tests/xmlwriter_open_uri_error_005.phpt | 16 + .../xmlwriter_set_indent_string_basic_001.phpt | 24 + .../xmlwriter_set_indent_string_error_001.phpt | 24 + .../xmlwriter_write_attribute_ns_basic_001.phpt | 28 + .../xmlwriter_write_attribute_ns_error_001.phpt | 35 + .../tests/xmlwriter_write_dtd_basic_001.phpt | 22 + .../tests/xmlwriter_write_dtd_error_001.phpt | 15 + ext/xsl/tests/bug26384.phpt | 2 +- ext/xsl/tests/bug48221.phpt | 17 + ext/xsl/tests/phpfunc-nostring.xsl | 10 + ext/xsl/tests/phpfunc-undef.xsl | 10 + ext/xsl/tests/phpfunc.xsl | 11 + ext/xsl/tests/xsl-phpinfo.phpt | 18 + ext/xsl/tests/xslt001.phpt | 2 +- ext/xsl/tests/xslt002.phpt | 2 +- ext/xsl/tests/xslt003.phpt | 2 +- ext/xsl/tests/xslt004.phpt | 2 +- ext/xsl/tests/xslt005.phpt | 2 +- ext/xsl/tests/xslt006.phpt | 2 +- ext/xsl/tests/xslt007.phpt | 2 +- ext/xsl/tests/xslt008.phpt | 2 +- ext/xsl/tests/xslt009.phpt | 2 +- ext/xsl/tests/xslt010.phpt | 3 +- ext/xsl/tests/xslt011.phpt | 4 +- ext/xsl/tests/xslt012.phpt | 2 +- .../xsltprocessor_getParameter-invalidparam.phpt | 17 + .../xsltprocessor_getParameter-wrongparam.phpt | 26 + ext/xsl/tests/xsltprocessor_getParameter.phpt | 19 + ...sltprocessor_registerPHPFunctions-allfuncs.phpt | 30 + ...cessor_registerPHPFunctions-array-multiple.phpt | 34 + ...ssor_registerPHPFunctions-array-notallowed.phpt | 28 + .../xsltprocessor_registerPHPFunctions-array.phpt | 26 + ...rocessor_registerPHPFunctions-funcnostring.phpt | 37 + ...ltprocessor_registerPHPFunctions-funcundef.phpt | 36 + .../xsltprocessor_registerPHPFunctions-null.phpt | 32 + ...essor_registerPHPFunctions-string-multiple.phpt | 32 + ...sor_registerPHPFunctions-string-notallowed.phpt | 28 + .../xsltprocessor_registerPHPFunctions-string.phpt | 26 + ...xsltprocessor_removeParameter-invalidparam.phpt | 18 + .../xsltprocessor_removeParameter-wrongparams.phpt | 23 + ext/xsl/tests/xsltprocessor_removeParameter.phpt | 20 + .../xsltprocessor_setparameter-errorquote.phpt | 21 + .../tests/xsltprocessor_setparameter-nostring.phpt | 22 + ext/xsl/xsltprocessor.c | 11 +- ext/zlib/tests/008.phpt | 11 + ext/zlib/tests/bug.tar | Bin 4720640 -> 0 bytes ext/zlib/tests/bug_40189.phpt | 2 +- ext/zlib/tests/bug_40189_2.phpt | 14 - ext/zlib/zlib.c | 155 +- generated_lists | 2 +- main/SAPI.c | 11 +- main/SAPI.h | 5 +- main/fopen_wrappers.c | 6 +- main/main.c | 69 +- main/network.c | 15 +- main/output.c | 6 +- main/php_config.h.in | 76 +- main/php_content_types.c | 4 +- main/php_ini.c | 16 +- main/php_sprintf.c | 6 +- main/php_streams.h | 5 +- main/php_version.h | 4 +- main/streams/cast.c | 10 +- main/streams/memory.c | 3 +- main/streams/mmap.c | 16 +- main/streams/php_stream_mmap.h | 7 +- main/streams/plain_wrapper.c | 8 +- main/streams/streams.c | 70 +- main/streams/userspace.c | 15 +- pear/install-pear-nozlib.phar | 123582 +++++++++--------- php.ini-development | 433 +- php.ini-production | 433 +- run-tests.php | 34 +- sapi/cgi/cgi_main.c | 224 +- sapi/cgi/tests/002.phpt | 18 +- sapi/cgi/tests/003.phpt | 6 +- sapi/cgi/tests/008.phpt | 4 +- sapi/cgi/tests/009.phpt | 2 +- sapi/cli/php.1.in | 4 +- sapi/cli/php_cli.c | 45 +- sapi/cli/tests/006.phpt | 2 +- sapi/isapi/php5isapi.c | 4 +- sapi/nsapi/nsapi.c | 10 +- scripts/dev/generate-phpt.phar | Bin 0 -> 52353 bytes scripts/dev/generate-phpt/build.xml | 15 + scripts/dev/generate-phpt/gtPackage.php | 30 + .../dev/generate-phpt/src/codeSnippets/array.txt | 9 + .../dev/generate-phpt/src/codeSnippets/boolean.txt | 6 + .../generate-phpt/src/codeSnippets/commentEnd.txt | 2 + .../src/codeSnippets/commentStart.txt | 2 + .../src/codeSnippets/emptyUnsetUndefNull.txt | 11 + .../dev/generate-phpt/src/codeSnippets/float.txt | 7 + scripts/dev/generate-phpt/src/codeSnippets/int.txt | 6 + .../generate-phpt/src/codeSnippets/loopClose.txt | 1 + .../generate-phpt/src/codeSnippets/loopStart.txt | 1 + .../dev/generate-phpt/src/codeSnippets/object.txt | 25 + .../generate-phpt/src/codeSnippets/skipif64b.txt | 1 + .../src/codeSnippets/skipifnot64b.txt | 1 + .../src/codeSnippets/skipifnotwin.txt | 1 + .../generate-phpt/src/codeSnippets/skipifwin.txt | 1 + .../dev/generate-phpt/src/codeSnippets/string.txt | 10 + scripts/dev/generate-phpt/src/generate-phpt.php | 115 + scripts/dev/generate-phpt/src/gtAutoload.php | 63 + scripts/dev/generate-phpt/src/gtClassMap.php | 48 + scripts/dev/generate-phpt/src/gtCodeSnippet.php | 72 + scripts/dev/generate-phpt/src/gtFunction.php | 48 + scripts/dev/generate-phpt/src/gtMethod.php | 139 + scripts/dev/generate-phpt/src/gtTestCaseWriter.php | 27 + scripts/dev/generate-phpt/src/gtTestSubject.php | 166 + scripts/dev/generate-phpt/src/gtText.php | 27 + .../exceptions/gtMissingArgumentException.php | 7 + .../setup/exceptions/gtMissingOptionsException.php | 7 + .../setup/exceptions/gtUnknownOptionException.php | 7 + .../setup/exceptions/gtUnknownSectionException.php | 6 + .../src/setup/gtCommandLineOptions.php | 98 + .../generate-phpt/src/setup/gtOptionalSections.php | 85 + .../dev/generate-phpt/src/setup/gtPreCondition.php | 14 + .../generate-phpt/src/setup/gtPreConditionList.php | 33 + .../src/setup/preconditions/gtIfClassHasMethod.php | 24 + .../gtIsSpecifiedFunctionOrMethod.php | 21 + .../setup/preconditions/gtIsSpecifiedTestType.php | 21 + .../src/setup/preconditions/gtIsValidClass.php | 24 + .../src/setup/preconditions/gtIsValidFunction.php | 25 + .../src/setup/preconditions/gtIsValidMethod.php | 28 + .../generate-phpt/src/testcase/gtBasicTestCase.php | 37 + .../src/testcase/gtBasicTestCaseFunction.php | 62 + .../src/testcase/gtBasicTestCaseMethod.php | 52 + .../generate-phpt/src/testcase/gtErrorTestCase.php | 53 + .../src/testcase/gtErrorTestCaseFunction.php | 57 + .../src/testcase/gtErrorTestCaseMethod.php | 59 + .../dev/generate-phpt/src/testcase/gtTestCase.php | 230 + .../src/testcase/gtVariationContainer.php | 54 + .../src/testcase/gtVariationContainerFunction.php | 43 + .../src/testcase/gtVariationContainerMethod.php | 46 + .../src/testcase/gtVariationTestCase.php | 55 + .../src/testcase/gtVariationTestCaseFunction.php | 64 + .../src/testcase/gtVariationTestCaseMethod.php | 68 + .../src/texts/functionOrMethodNotSpecified.txt | 3 + scripts/dev/generate-phpt/src/texts/help.txt | 14 + .../generate-phpt/src/texts/methodNotSpecified.txt | 4 + .../src/texts/testTypeNotSpecified.txt | 3 + .../dev/generate-phpt/src/texts/unknownClass.txt | 4 + .../generate-phpt/src/texts/unknownFunction.txt | 4 + .../dev/generate-phpt/src/texts/unknownMethod.txt | 4 + .../tests/gtBasicTestCaseFunctionTest.php | 24 + .../tests/gtBasicTestCaseMethodTest.php | 28 + .../dev/generate-phpt/tests/gtCodeSnippetTest.php | 15 + .../tests/gtCommandLineOptionsTest.php | 46 + .../tests/gtErrorTestCaseFunctionTest.php | 28 + .../tests/gtErrorTestCaseMethodTest.php | 30 + scripts/dev/generate-phpt/tests/gtFunctionTest.php | 71 + .../generate-phpt/tests/gtIfClassHasMethodTest.php | 41 + .../tests/gtIsSpecifiedFunctionOrMethodTest.php | 41 + .../tests/gtIsSpecifiedTestTypeTest.php | 32 + .../dev/generate-phpt/tests/gtIsValidClassTest.php | 41 + .../generate-phpt/tests/gtIsValidFunctionTest.php | 40 + .../generate-phpt/tests/gtIsValidMethodTest.php | 40 + scripts/dev/generate-phpt/tests/gtMethodTest.php | 82 + .../generate-phpt/tests/gtOptionalSectionsTest.php | 58 + .../tests/gtVariationTestCaseFunctionTest.php | 59 + .../tests/gtVariationTestCaseMethodTest.php | 27 + scripts/dev/generate_phpt.php | 1148 - scripts/phpize.in | 30 +- scripts/phpize.m4 | 11 +- tests/basic/bug46313-win.phpt | 3 + tests/classes/__call_005.phpt | 2 +- tests/classes/__call_007.phpt | 2 +- tests/classes/inheritance_007.phpt | 20 +- tests/classes/interface_optional_arg_003.inc | 4 + tests/classes/interface_optional_arg_003.phpt | 17 + tests/classes/iterators_008.phpt | 45 + .../static_properties_undeclared_assign.phpt | 9 + .../static_properties_undeclared_assignInc.phpt | 9 + .../static_properties_undeclared_assignRef.phpt | 10 + .../classes/static_properties_undeclared_inc.phpt | 9 + .../static_properties_undeclared_isset.phpt | 9 + .../classes/static_properties_undeclared_read.phpt | 9 + tests/func/ini_alter.phpt | 19 + tests/lang/045.phpt | 23 + tests/lang/bug45392.phpt | 3 - tests/lang/compare_objects_basic1.phpt | 60 + tests/lang/compare_objects_basic2.phpt | 28 + tests/lang/engine_assignExecutionOrder_001.phpt | 152 + tests/lang/engine_assignExecutionOrder_002.phpt | 135 + tests/lang/engine_assignExecutionOrder_003.phpt | 96 + tests/lang/engine_assignExecutionOrder_004.phpt | 52 + tests/lang/engine_assignExecutionOrder_005.phpt | 74 + tests/lang/engine_assignExecutionOrder_006.phpt | 138 + tests/lang/engine_assignExecutionOrder_007.phpt | 46 + tests/lang/engine_assignExecutionOrder_008.phpt | 75 + tests/lang/engine_assignExecutionOrder_009.phpt | 36 + tests/lang/execution_order.phpt | 198 + tests/lang/foreachLoop.001.phpt | 64 + tests/lang/foreachLoop.002.phpt | 173 + tests/lang/foreachLoop.003.phpt | 46 + tests/lang/foreachLoop.004.phpt | 76 + tests/lang/foreachLoop.005.phpt | 23 + tests/lang/foreachLoop.006.phpt | 11 + tests/lang/foreachLoop.007.phpt | 11 + tests/lang/foreachLoop.008.phpt | 10 + tests/lang/foreachLoop.009.phpt | 82 + tests/lang/foreachLoop.010.phpt | 40 + tests/lang/foreachLoop.011.phpt | 34 + tests/lang/foreachLoop.012.phpt | 494 + tests/lang/foreachLoop.013.phpt | 555 + tests/lang/foreachLoop.014.phpt | 556 + tests/lang/foreachLoop.015.phpt | 557 + tests/lang/foreachLoop.016.phpt | 198 + tests/lang/foreachLoop.017.phpt | 11 + tests/lang/foreachLoopIterator.001.phpt | 134 + tests/lang/foreachLoopIterator.002.phpt | 24 + tests/lang/foreachLoopIteratorAggregate.001.phpt | 270 + tests/lang/foreachLoopIteratorAggregate.002.phpt | 53 + tests/lang/foreachLoopIteratorAggregate.003.phpt | 133 + tests/lang/foreachLoopIteratorAggregate.004.phpt | 104 + tests/lang/foreachLoopObjects.001.phpt | 69 + tests/lang/foreachLoopObjects.002.phpt | 587 + tests/lang/foreachLoopObjects.003.phpt | 250 + tests/lang/foreachLoopObjects.004.phpt | 55 + tests/lang/foreachLoopObjects.005.phpt | 78 + tests/lang/foreachLoopObjects.006.phpt | 147 + tests/lang/operators/add_basiclong_64bit.phpt | 582 + tests/lang/operators/add_variationStr.phpt | 416 + .../lang/operators/bitwiseAnd_basiclong_64bit.phpt | 582 + tests/lang/operators/bitwiseAnd_variationStr.phpt | 416 + .../lang/operators/bitwiseNot_basiclong_64bit.phpt | 60 + tests/lang/operators/bitwiseNot_variationStr.phpt | 48 + .../lang/operators/bitwiseOr_basiclong_64bit.phpt | 583 + tests/lang/operators/bitwiseOr_variationStr.phpt | 416 + .../bitwiseShiftLeft_basiclong_64bit.phpt | 583 + .../operators/bitwiseShiftLeft_variationStr.phpt | 421 + .../bitwiseShiftLeft_variationStr_64bit.phpt | 420 + .../bitwiseShiftRight_basiclong_64bit.phpt | 583 + .../operators/bitwiseShiftRight_variationStr.phpt | 416 + .../lang/operators/bitwiseXor_basiclong_64bit.phpt | 583 + tests/lang/operators/bitwiseXor_variationStr.phpt | 416 + tests/lang/operators/divide_basiclong_64bit.phpt | 582 + tests/lang/operators/divide_variationStr.phpt | 416 + tests/lang/operators/modulus_basiclong_64bit.phpt | 582 + tests/lang/operators/modulus_variationStr.phpt | 416 + tests/lang/operators/multiply_basiclong_64bit.phpt | 582 + tests/lang/operators/multiply_variationStr.phpt | 416 + tests/lang/operators/negate_basiclong_64bit.phpt | 60 + tests/lang/operators/negate_variationStr.phpt | 48 + tests/lang/operators/operator_equals_basic.phpt | 65 + .../lang/operators/operator_equals_variation.phpt | 63 + .../operators/operator_equals_variation_64bit.phpt | 65 + tests/lang/operators/operator_gt_basic.phpt | 65 + .../lang/operators/operator_gt_or_equal_basic.phpt | 65 + .../operators/operator_gt_or_equal_variation.phpt | 63 + .../operator_gt_or_equal_variation_64bit.phpt | 63 + tests/lang/operators/operator_gt_variation.phpt | 62 + .../operators/operator_gt_variation_64bit.phpt | 62 + tests/lang/operators/operator_identical_basic.phpt | 65 + .../operators/operator_identical_variation.phpt | 63 + .../operator_identical_variation_64bit.phpt | 65 + tests/lang/operators/operator_lt_basic.phpt | 62 + .../lang/operators/operator_lt_or_equal_basic.phpt | 64 + .../operators/operator_lt_or_equal_variation.phpt | 63 + .../operator_lt_or_equal_variation_64bit.phpt | 63 + tests/lang/operators/operator_lt_variation.phpt | 60 + .../operators/operator_lt_variation_64bit.phpt | 60 + tests/lang/operators/operator_notequals_basic.phpt | 65 + .../operators/operator_notequals_variation.phpt | 63 + .../operator_notequals_variation_64bit.phpt | 65 + .../operators/operator_notidentical_basic.phpt | 65 + .../operators/operator_notidentical_variation.phpt | 64 + .../operator_notidentical_variation_64bit.phpt | 65 + tests/lang/operators/postdec_basiclong_64bit.phpt | 61 + tests/lang/operators/postdec_variationStr.phpt | 49 + tests/lang/operators/postinc_basiclong_64bit.phpt | 61 + tests/lang/operators/postinc_variationStr.phpt | 49 + tests/lang/operators/predec_basiclong_64bit.phpt | 60 + tests/lang/operators/predec_variationStr.phpt | 48 + tests/lang/operators/preinc_basiclong_64bit.phpt | 60 + tests/lang/operators/preinc_variationStr.phpt | 48 + tests/lang/operators/subtract_basiclong_64bit.phpt | 582 + tests/lang/operators/subtract_variationStr.phpt | 416 + tests/lang/returnByReference.001.phpt | 20 + tests/lang/returnByReference.002.phpt | 29 + tests/lang/returnByReference.003.phpt | 55 + tests/lang/returnByReference.004.phpt | 57 + tests/lang/returnByReference.005.phpt | 58 + tests/lang/returnByReference.006.phpt | 60 + tests/lang/returnByReference.007.phpt | 63 + tests/lang/returnByReference.008.phpt | 64 + tests/lang/returnByReference.009.phpt | 39 + tests/output/ob_001.phpt | 8 + tests/output/ob_002.phpt | 9 + tests/output/ob_003.phpt | 13 + tests/output/ob_004.phpt | 11 + tests/output/ob_005.phpt | 14 + tests/output/ob_006.phpt | 12 + tests/output/ob_007.phpt | 11 + tests/output/ob_008.phpt | 11 + tests/output/ob_009.phpt | 12 + tests/output/ob_010.phpt | 13 + tests/output/ob_get_status.phpt | 34 + tests/output/ob_start_basic_unerasable_005.phpt | 8 +- win32/build/Makefile | 9 +- win32/build/config.w32 | 20 +- win32/build/config.w32.h.in | 6 +- win32/build/confutils.js | 7 +- win32/build/mkdist.php | 42 +- win32/build/registersyslog.php | 2 +- win32/build/template.rc | 6 +- win32/php_stdint.h | 2 + 1898 files changed, 191321 insertions(+), 142510 deletions(-) delete mode 100644 README.UPDATE_5_2 create mode 100644 Zend/tests/bug42143.phpt create mode 100644 Zend/tests/bug47516.phpt create mode 100644 Zend/tests/bug47596.phpt create mode 100644 Zend/tests/bug47699.phpt create mode 100644 Zend/tests/bug47714.phpt create mode 100644 Zend/tests/bug47771.phpt create mode 100644 Zend/tests/bug47801.phpt create mode 100644 Zend/tests/bug47836.phpt create mode 100644 Zend/tests/bug47880.phpt create mode 100644 Zend/tests/bug47981.phpt create mode 100644 Zend/tests/bug48004.phpt create mode 100644 Zend/tests/bug48215.phpt create mode 100644 Zend/tests/bug48228.phpt create mode 100644 Zend/tests/bug48248.phpt create mode 100644 Zend/tests/bug48408.phpt create mode 100644 Zend/tests/bug48409.phpt create mode 100644 Zend/tests/bug48428.phpt create mode 100644 Zend/tests/bug48533.phpt create mode 100644 Zend/tests/exception_010.phpt create mode 100644 Zend/tests/function_exists_basic.phpt create mode 100644 Zend/tests/function_exists_error.phpt create mode 100644 Zend/tests/function_exists_variation1.phpt create mode 100644 Zend/tests/get_defined_functions_basic.phpt create mode 100644 Zend/tests/get_defined_functions_error.phpt create mode 100644 ext/curl/tests/bug48203.phpt create mode 100644 ext/curl/tests/bug48514.phpt delete mode 100644 ext/curl/tests/curl_001.phpt delete mode 100644 ext/curl/tests/curl_002.phpt delete mode 100644 ext/curl/tests/curl_003.phpt delete mode 100644 ext/curl/tests/curl_004.phpt delete mode 100644 ext/curl/tests/curl_005.phpt delete mode 100755 ext/curl/tests/curl_006.phpt create mode 100644 ext/curl/tests/curl_basic_001.phpt create mode 100644 ext/curl/tests/curl_basic_002.phpt create mode 100644 ext/curl/tests/curl_basic_003.phpt create mode 100644 ext/curl/tests/curl_basic_004.phpt create mode 100644 ext/curl/tests/curl_basic_005.phpt create mode 100755 ext/curl/tests/curl_basic_006.phpt create mode 100755 ext/curl/tests/curl_basic_007.phpt create mode 100755 ext/curl/tests/curl_basic_008.phpt create mode 100644 ext/curl/tests/curl_basic_009.phpt create mode 100644 ext/curl/tests/curl_basic_010.phpt create mode 100644 ext/curl/tests/curl_basic_011.phpt create mode 100644 ext/curl/tests/curl_basic_012.phpt create mode 100644 ext/curl/tests/curl_basic_013.phpt create mode 100644 ext/curl/tests/curl_basic_014.phpt create mode 100644 ext/curl/tests/curl_basic_015.phpt create mode 100644 ext/curl/tests/curl_basic_016.phpt create mode 100644 ext/curl/tests/curl_basic_017.phpt create mode 100644 ext/curl/tests/curl_basic_018.phpt create mode 100644 ext/curl/tests/curl_basic_019.phpt create mode 100644 ext/curl/tests/curl_basic_020.phpt create mode 100644 ext/curl/tests/curl_basic_021.phpt delete mode 100644 ext/date/config.m4 create mode 100644 ext/date/config0.m4 create mode 100644 ext/date/tests/bug45682.phpt create mode 100644 ext/date/tests/bug46108.phpt create mode 100644 ext/date/tests/bug48058.phpt create mode 100644 ext/date/tests/bug48097.phpt create mode 100644 ext/date/tests/date_add_basic2.phpt create mode 100644 ext/date/tests/date_create-relative.phpt create mode 100644 ext/date/tests/date_create_from_format_basic.phpt create mode 100644 ext/date/tests/date_create_from_format_basic2.phpt create mode 100644 ext/date/tests/date_get_last_errors_basic.phpt create mode 100644 ext/date/tests/date_parse_from_format_basic.phpt create mode 100644 ext/date/tests/strtotime-relative.phpt create mode 100644 ext/date/tests/strtotime_basic2.phpt create mode 100644 ext/dba/tests/bug48240.phpt create mode 100644 ext/dom/tests/DOMAttr_construct_error_001.phpt create mode 100644 ext/dom/tests/DOMAttr_name_basic_001.phpt create mode 100755 ext/dom/tests/DOMAttr_ownerElement_error_001.phpt create mode 100644 ext/dom/tests/DOMAttr_value_basic_002.phpt create mode 100644 ext/dom/tests/DOMCDATASection_construct_error_001.phpt create mode 100644 ext/dom/tests/DOMCharacterData_appendData_error_001.phpt create mode 100755 ext/dom/tests/DOMCharacterData_data_error_002.phpt create mode 100644 ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt create mode 100644 ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt create mode 100644 ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt create mode 100644 ext/dom/tests/DOMCharacterData_insertData_error_001.phpt create mode 100644 ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt create mode 100644 ext/dom/tests/DOMComment_construct_basic_001.phpt create mode 100644 ext/dom/tests/DOMComment_construct_error_001.phpt create mode 100644 ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt create mode 100644 ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt create mode 100644 ext/dom/tests/DOMDocumentFragment_appendXML_error_002.phpt create mode 100644 ext/dom/tests/DOMDocumentFragment_appendXML_error_003.phpt create mode 100644 ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt create mode 100644 ext/dom/tests/DOMDocumentFragment_construct_basic_002.phpt create mode 100644 ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt create mode 100644 ext/dom/tests/DOMDocumentType_basic_001.phpt create mode 100644 ext/dom/tests/DOMDocumentType_entities_error_001.phpt create mode 100644 ext/dom/tests/DOMDocumentType_internalSubset_error_001.phpt create mode 100644 ext/dom/tests/DOMDocumentType_name_error_001.phpt create mode 100644 ext/dom/tests/DOMDocumentType_notations_error_001.phpt create mode 100644 ext/dom/tests/DOMDocumentType_publicId_basic_001.phpt create mode 100644 ext/dom/tests/DOMDocumentType_publicId_error_001.phpt create mode 100644 ext/dom/tests/DOMDocumentType_systemId_basic_001.phpt create mode 100644 ext/dom/tests/DOMDocumentType_systemId_error_001.phpt create mode 100644 ext/dom/tests/bug47849.phpt create mode 100644 ext/exif/tests/bug48378.jpeg create mode 100644 ext/exif/tests/bug48378.phpt create mode 100644 ext/filter/tests/bug47745.phpt create mode 100644 ext/gd/libgd/gd_arc.c create mode 100644 ext/gd/libgd/gd_color.c create mode 100644 ext/gd/libgd/gd_compat.c create mode 100644 ext/gd/libgd/gd_compat.h create mode 100644 ext/gd/libgd/gd_filter.c create mode 100644 ext/gd/libgd/gd_intern.h create mode 100644 ext/gd/libgd/gd_rotate.c create mode 100644 ext/gettext/tests/gettext_basic-enus.phpt create mode 100644 ext/gettext/tests/gettext_bind_textdomain_codeset-retval.phpt create mode 100644 ext/gettext/tests/gettext_bind_textdomain_codeset-wrongparams.phpt create mode 100644 ext/gettext/tests/gettext_bindtextdomain-cwd.phpt create mode 100644 ext/gettext/tests/gettext_bindtextdomain-emptydomain.phpt create mode 100644 ext/gettext/tests/gettext_bindtextdomain-path.phpt create mode 100644 ext/gettext/tests/gettext_bindtextdomain-wrongparams.phpt create mode 100644 ext/gettext/tests/gettext_dcgettext-wrongparams.phpt create mode 100644 ext/gettext/tests/gettext_dcgettext.phpt create mode 100644 ext/gettext/tests/gettext_dgettext.phpt create mode 100644 ext/gettext/tests/gettext_dgettext_error_wrongparams.phpt create mode 100644 ext/gettext/tests/gettext_dngettext-plural.phpt create mode 100644 ext/gettext/tests/gettext_dngettext-wrongparams.phpt create mode 100644 ext/gettext/tests/gettext_gettext_error_wrongparams.phpt create mode 100644 ext/gettext/tests/gettext_ngettext-wrongparams.phpt create mode 100644 ext/gettext/tests/gettext_ngettext.phpt create mode 100644 ext/gettext/tests/gettext_phpinfo.phpt create mode 100644 ext/gettext/tests/gettext_textdomain-retval.phpt create mode 100644 ext/gettext/tests/gettext_textdomain-wrongparams.phpt create mode 100644 ext/gettext/tests/locale/en/LC_CTYPE/dgettextTest.mo create mode 100644 ext/gettext/tests/locale/en/LC_CTYPE/dgettextTest.po create mode 100644 ext/gettext/tests/locale/en/LC_CTYPE/dgettextTest_switch.mo create mode 100644 ext/gettext/tests/locale/en/LC_CTYPE/dgettextTest_switch.po create mode 100644 ext/gettext/tests/locale/en/LC_CTYPE/dgettextTest_switched.po create mode 100644 ext/gettext/tests/locale/en/LC_CTYPE/dngettextTest.mo create mode 100644 ext/gettext/tests/locale/en/LC_CTYPE/dngettextTest.po create mode 100644 ext/gettext/tests/locale/en/LC_MESSAGES/dgettextTest.mo create mode 100644 ext/gettext/tests/locale/en/LC_MESSAGES/dgettextTest.po create mode 100644 ext/gettext/tests/locale/en/LC_MESSAGES/dgettextTest_switch.mo create mode 100644 ext/gettext/tests/locale/en/LC_MESSAGES/dgettextTest_switch.po create mode 100644 ext/gettext/tests/locale/en/LC_MESSAGES/dngettextTest.mo create mode 100644 ext/gettext/tests/locale/en/LC_MESSAGES/dngettextTest.po create mode 100644 ext/gettext/tests/locale/en/LC_MESSAGES/messages.mo create mode 100644 ext/gettext/tests/locale/en/LC_MESSAGES/messages.po create mode 100644 ext/iconv/tests/iconv_basic.phpt create mode 100644 ext/iconv/tests/iconv_encoding_basic.phpt create mode 100644 ext/iconv/tests/iconv_get_encoding_error.phpt create mode 100644 ext/iconv/tests/iconv_mime_decode_headers_variation1.phpt create mode 100644 ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt create mode 100644 ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt create mode 100644 ext/iconv/tests/iconv_mime_decode_variation1.phpt create mode 100644 ext/iconv/tests/iconv_mime_decode_variation2.phpt create mode 100644 ext/iconv/tests/iconv_mime_decode_variation3.phpt create mode 100644 ext/iconv/tests/iconv_set_encoding_error.phpt create mode 100644 ext/iconv/tests/iconv_set_encoding_variation.phpt create mode 100644 ext/iconv/tests/iconv_stream_filter_delimiter.phpt create mode 100644 ext/iconv/tests/iconv_strlen_basic.phpt create mode 100644 ext/iconv/tests/iconv_strlen_error1.phpt create mode 100644 ext/iconv/tests/iconv_strlen_error2.phpt create mode 100644 ext/iconv/tests/iconv_strlen_variation1.phpt create mode 100644 ext/iconv/tests/iconv_strlen_variation2.phpt create mode 100644 ext/iconv/tests/iconv_strpos_basic.phpt create mode 100644 ext/iconv/tests/iconv_strpos_error1.phpt create mode 100644 ext/iconv/tests/iconv_strpos_error2.phpt create mode 100644 ext/iconv/tests/iconv_strpos_variation1.phpt create mode 100644 ext/iconv/tests/iconv_strpos_variation2.phpt create mode 100644 ext/iconv/tests/iconv_strpos_variation3.phpt create mode 100644 ext/iconv/tests/iconv_strpos_variation3_64bit.phpt create mode 100644 ext/iconv/tests/iconv_strpos_variation4.phpt create mode 100644 ext/iconv/tests/iconv_strpos_variation5.phpt create mode 100644 ext/iconv/tests/iconv_strrpos_basic.phpt create mode 100644 ext/iconv/tests/iconv_strrpos_error1.phpt create mode 100644 ext/iconv/tests/iconv_strrpos_error2.phpt create mode 100644 ext/iconv/tests/iconv_strrpos_variation1.phpt create mode 100644 ext/iconv/tests/iconv_strrpos_variation2.phpt create mode 100644 ext/iconv/tests/iconv_strrpos_variation3.phpt create mode 100644 ext/iconv/tests/iconv_substr_basic.phpt create mode 100644 ext/iconv/tests/iconv_substr_error1.phpt create mode 100644 ext/iconv/tests/iconv_substr_error2.phpt create mode 100644 ext/imap/tests/imap_body.phpt create mode 100644 ext/imap/tests/imap_expunge_error.phpt create mode 100644 ext/imap/tests/imap_gc_error.phpt create mode 100644 ext/imap/tests/imap_headers.phpt create mode 100644 ext/imap/tests/imap_mutf7_to_utf8.phpt create mode 100644 ext/imap/tests/imap_num_msg_error.phpt create mode 100644 ext/imap/tests/imap_num_recent_error.phpt create mode 100644 ext/imap/tests/imap_open_error.phpt create mode 100644 ext/imap/tests/imap_ping_error.phpt create mode 100644 ext/imap/tests/imap_utf8_to_mutf7_basic.phpt create mode 100644 ext/intl/tests/bug48227.phpt create mode 100644 ext/json/tests/json_decode_basic.phpt create mode 100644 ext/json/tests/json_decode_error.phpt create mode 100644 ext/json/tests/json_encode_basic.phpt create mode 100644 ext/json/tests/json_encode_basic_utf8.phpt create mode 100644 ext/json/tests/json_encode_error.phpt create mode 100644 ext/ldap/tests/bug48441.phpt create mode 100644 ext/ldap/tests/connect.inc create mode 100644 ext/ldap/tests/skipifbindfailure.inc create mode 100644 ext/mbstring/tests/mb_convert_encoding_stateful.phpt create mode 100644 ext/mysqli/tests/bug45289.phpt delete mode 100644 ext/oci8/package2.xml create mode 100644 ext/odbc/tests/config.inc create mode 100644 ext/odbc/tests/odbc_columnprivileges_001.phpt create mode 100644 ext/odbc/tests/odbc_columns_001.phpt create mode 100644 ext/odbc/tests/odbc_data_source_001.phpt create mode 100644 ext/odbc/tests/odbc_exec_001.phpt create mode 100644 ext/odbc/tests/odbc_exec_002.phpt create mode 100644 ext/odbc/tests/odbc_free_result_001.phpt create mode 100644 ext/odbc/tests/odbc_tables_001.phpt create mode 100644 ext/odbc/tests/skipif.inc create mode 100644 ext/openssl/tests/bug47828.phpt create mode 100644 ext/pcntl/tests/003.phpt create mode 100644 ext/pcntl/tests/bug47566.phpt create mode 100644 ext/pcre/tests/bug47662.phpt create mode 100644 ext/pdo/tests/bug47769.phpt create mode 100644 ext/pdo/tests/bug_44173.phpt create mode 100644 ext/pdo/tests/bug_44409.phpt create mode 100644 ext/pdo/tests/bug_44861.phpt create mode 100644 ext/pdo_oci/tests/bug46274.phpt create mode 100644 ext/pdo_oci/tests/bug46274_2.phpt create mode 100644 ext/phar/tests/fatal_error_webphar.phpt create mode 100644 ext/phar/tests/files/pear2coverage.phar.php create mode 100644 ext/phar/tests/phar_construct_invalidurl.phpt create mode 100644 ext/phar/tests/tar/bignames_overflow.phpt create mode 100644 ext/phar/tests/tar/files/Net_URL-1.0.15.tgz create mode 100644 ext/phar/tests/tar/files/make.dangerous.tar.php.inc create mode 100644 ext/phar/tests/tar/phar_convert_phar4.phpt create mode 100644 ext/phar/tests/tar/tar_nohash.phpt create mode 100644 ext/posix/tests/posix_access.phpt create mode 100644 ext/posix/tests/posix_access_error_modes.phpt create mode 100644 ext/posix/tests/posix_access_error_wrongparams.phpt create mode 100644 ext/posix/tests/posix_access_safemode.phpt create mode 100644 ext/posix/tests/posix_ctermid.phpt create mode 100644 ext/posix/tests/posix_getcwd_basic.phpt create mode 100644 ext/posix/tests/posix_getgrgid.phpt create mode 100644 ext/posix/tests/posix_getgrgid_basic.phpt create mode 100644 ext/posix/tests/posix_getgrgid_macosx.phpt create mode 100644 ext/posix/tests/posix_getgrgid_wrongparams.phpt create mode 100644 ext/posix/tests/posix_getgrnam_basic.phpt create mode 100644 ext/posix/tests/posix_getgroups_basic.phpt create mode 100644 ext/posix/tests/posix_getpgid_basic.phpt create mode 100644 ext/posix/tests/posix_getpgrp_basic.phpt create mode 100644 ext/posix/tests/posix_getpid_basic.phpt create mode 100644 ext/posix/tests/posix_getppid_basic.phpt create mode 100644 ext/posix/tests/posix_getpwnam_basic.phpt create mode 100644 ext/posix/tests/posix_getpwuid_basic.phpt create mode 100644 ext/posix/tests/posix_getrlimit_basic.phpt create mode 100644 ext/posix/tests/posix_getsid.phpt create mode 100644 ext/posix/tests/posix_getsid_basic.phpt create mode 100644 ext/posix/tests/posix_getsid_error.phpt create mode 100644 ext/posix/tests/posix_initgroups_basic.phpt create mode 100644 ext/posix/tests/posix_kill_basic.phpt create mode 100644 ext/posix/tests/posix_mkfifo_safemode.phpt create mode 100644 ext/posix/tests/posix_mkfifo_wrongparams.phpt create mode 100644 ext/posix/tests/posix_mknod_basic.phpt create mode 100644 ext/posix/tests/posix_times.phpt create mode 100644 ext/posix/tests/posix_times_basic.phpt create mode 100644 ext/posix/tests/posix_ttyname.phpt create mode 100644 ext/posix/tests/posix_ttyname_error_wrongparams.phpt create mode 100644 ext/posix/tests/posix_uname.phpt create mode 100644 ext/posix/tests/posix_uname_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_FileInfo_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_FileInfo_error.phpt create mode 100644 ext/reflection/tests/ReflectionClass_constructor_001.phpt create mode 100644 ext/reflection/tests/ReflectionClass_constructor_002.phpt create mode 100644 ext/reflection/tests/ReflectionClass_export_basic1.phpt create mode 100644 ext/reflection/tests/ReflectionClass_export_basic2.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getConstant_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getConstant_error.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getConstants_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getConstants_error.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getConstructor_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getConstructor_error.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getExtensionName_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getExtensionName_variation.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getExtension_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getExtension_variation.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getInterfaceNames_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getModifierNames_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getModifiers_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getName_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getName_error.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getName_error1.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getNamespaceName.phpt create mode 100644 ext/reflection/tests/ReflectionClass_getParentClass.phpt create mode 100644 ext/reflection/tests/ReflectionClass_hasConstant_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_hasMethod_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_hasProperty_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isAbstract_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isFinal_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isInstance_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isInstance_error.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isInstantiable_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isInstantiable_error.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isInstantiable_variation.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isInterface_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isInternal_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isInternal_error.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isIterateable_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isIterateable_variation1.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isSubclassOf_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isSubclassOf_error.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isSubclassOf_error1.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isUserDefined_basic.phpt create mode 100644 ext/reflection/tests/ReflectionClass_isUserDefined_error.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_constructor_basic.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_constructor_error.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_export_basic.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_getClassNames_variation1.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_getClasses_basic.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_getDependencies_basic.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_getDependencies_variation2.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_getName_basic.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_getVersion_basic.phpt create mode 100644 ext/reflection/tests/ReflectionExtension_info_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_FileInfo_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_FileInfo_error.phpt create mode 100644 ext/reflection/tests/ReflectionObject___toString_basic1.phpt create mode 100644 ext/reflection/tests/ReflectionObject___toString_basic2.phpt create mode 100644 ext/reflection/tests/ReflectionObject_constructor_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_constructor_error.phpt create mode 100644 ext/reflection/tests/ReflectionObject_export_basic1.phpt create mode 100644 ext/reflection/tests/ReflectionObject_export_basic2.phpt create mode 100644 ext/reflection/tests/ReflectionObject_export_basic3.phpt create mode 100644 ext/reflection/tests/ReflectionObject_getConstant_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_getConstant_error.phpt create mode 100644 ext/reflection/tests/ReflectionObject_getConstants_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_getConstants_error.phpt create mode 100644 ext/reflection/tests/ReflectionObject_getConstructor_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_getConstructor_error.phpt create mode 100644 ext/reflection/tests/ReflectionObject_getName_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_getName_error.phpt create mode 100644 ext/reflection/tests/ReflectionObject_getName_error1.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isInstance_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isInstance_error.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isInstantiable_error.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isInstantiable_variation.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isInternal_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isInternal_error.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isSubclassOf_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isUserDefined_basic.phpt create mode 100644 ext/reflection/tests/ReflectionObject_isUserDefined_error.phpt create mode 100644 ext/reflection/tests/ReflectionParameter_export_basic.phpt create mode 100644 ext/reflection/tests/ReflectionParameter_export_error.phpt create mode 100644 ext/reflection/tests/ReflectionParameter_export_error2.phpt create mode 100644 ext/reflection/tests/ReflectionParameter_export_error3.phpt create mode 100644 ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt create mode 100644 ext/reflection/tests/ReflectionParameter_getPosition_basic.phpt create mode 100644 ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt create mode 100644 ext/reflection/tests/ReflectionParameter_toString_basic.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_basic1.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_basic2.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_constructor_error.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_constructor_variation1.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_error.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_export_basic.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_export_error.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_getDeclaringClass_variation1.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_getDocComment_basic.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_getDocComment_error.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_getModifiers_basic.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_getValue_error.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_isDefault_basic.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_setAccessible.phpt create mode 100644 ext/reflection/tests/ReflectionProperty_setValue_error.phpt create mode 100644 ext/reflection/tests/bug48336.phpt delete mode 100644 ext/reflection/tests/reflectionClass_FileInfo_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_FileInfo_error.phpt delete mode 100644 ext/reflection/tests/reflectionClass_constructor_001.phpt delete mode 100644 ext/reflection/tests/reflectionClass_constructor_002.phpt delete mode 100644 ext/reflection/tests/reflectionClass_export_basic1.phpt delete mode 100644 ext/reflection/tests/reflectionClass_export_basic2.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getConstant_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getConstant_error.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getConstants_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getConstants_error.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getConstructor_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getConstructor_error.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getExtensionName_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getExtensionName_variation.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getExtension_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getExtension_variation.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getInterfaceNames_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getModifierNames_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getModifiers_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getName_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getName_error.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getName_error1.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getNamespaceName.phpt delete mode 100644 ext/reflection/tests/reflectionClass_getParentClass.phpt delete mode 100644 ext/reflection/tests/reflectionClass_hasConstant_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_hasMethod_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_hasProperty_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isAbstract_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isFinal_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isInstance_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isInstance_error.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isInstantiable_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isInstantiable_error.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isInstantiable_variation.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isInterface_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isInternal_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isInternal_error.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isIterateable_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isIterateable_variation1.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isSubclassOf_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isSubclassOf_error.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isSubclassOf_error1.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isUserDefined_basic.phpt delete mode 100644 ext/reflection/tests/reflectionClass_isUserDefined_error.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_constructor_basic.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_constructor_error.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_export_basic.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_getClassNames_basic.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_getClassNames_variation1.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_getClasses_basic.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_getDependencies_basic.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_getDependencies_variation2.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_getName_basic.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_getVersion_basic.phpt delete mode 100644 ext/reflection/tests/reflectionExtension_info_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_FileInfo_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_FileInfo_error.phpt delete mode 100644 ext/reflection/tests/reflectionObject___toString_basic1.phpt delete mode 100644 ext/reflection/tests/reflectionObject___toString_basic2.phpt delete mode 100644 ext/reflection/tests/reflectionObject_constructor_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_constructor_error.phpt delete mode 100644 ext/reflection/tests/reflectionObject_export_basic1.phpt delete mode 100644 ext/reflection/tests/reflectionObject_export_basic2.phpt delete mode 100644 ext/reflection/tests/reflectionObject_export_basic3.phpt delete mode 100644 ext/reflection/tests/reflectionObject_getConstant_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_getConstant_error.phpt delete mode 100644 ext/reflection/tests/reflectionObject_getConstants_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_getConstants_error.phpt delete mode 100644 ext/reflection/tests/reflectionObject_getConstructor_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_getConstructor_error.phpt delete mode 100644 ext/reflection/tests/reflectionObject_getName_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_getName_error.phpt delete mode 100644 ext/reflection/tests/reflectionObject_getName_error1.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isInstance_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isInstance_error.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isInstantiable_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isInstantiable_error.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isInstantiable_variation.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isInternal_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isInternal_error.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isSubclassOf_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isSubclassOf_error.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isUserDefined_basic.phpt delete mode 100644 ext/reflection/tests/reflectionObject_isUserDefined_error.phpt delete mode 100644 ext/reflection/tests/reflectionParameter_export_basic.phpt delete mode 100644 ext/reflection/tests/reflectionParameter_export_error.phpt delete mode 100644 ext/reflection/tests/reflectionParameter_export_error2.phpt delete mode 100644 ext/reflection/tests/reflectionParameter_export_error3.phpt delete mode 100644 ext/reflection/tests/reflectionParameter_getDeclaringFunction_basic.phpt delete mode 100644 ext/reflection/tests/reflectionParameter_getPosition_basic.phpt delete mode 100644 ext/reflection/tests/reflectionParameter_invalidMethodInConstructor.phpt delete mode 100644 ext/reflection/tests/reflectionParameter_toString_basic.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_basic1.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_basic2.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_constructor_error.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_constructor_variation1.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_error.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_export_basic.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_export_error.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_getDeclaringClass_variation1.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_getDocComment_basic.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_getDocComment_error.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_getModifiers_basic.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_getValue_error.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_isDefault_basic.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_setAccessible.phpt delete mode 100644 ext/reflection/tests/reflectionProperty_setValue_error.phpt create mode 100644 ext/session/tests/bug42596.phpt create mode 100644 ext/soap/tests/bug48557.phpt create mode 100644 ext/soap/tests/bug48557.wsdl create mode 100644 ext/sockets/tests/ipv6_skipif.inc create mode 100644 ext/sockets/tests/socket_accept-wrongparams.phpt create mode 100644 ext/sockets/tests/socket_create_listen-nobind.phpt create mode 100644 ext/sockets/tests/socket_create_listen-wrongparams.phpt create mode 100644 ext/sockets/tests/socket_create_listen.phpt create mode 100644 ext/sockets/tests/socket_create_pair-wrongparams.phpt create mode 100644 ext/sockets/tests/socket_create_pair.phpt create mode 100644 ext/sockets/tests/socket_listen-wrongparams.phpt create mode 100644 ext/sockets/tests/socket_select-wrongparams-1.phpt create mode 100644 ext/sockets/tests/socket_select-wrongparams-2.phpt create mode 100644 ext/sockets/tests/socket_select-wrongparams-3.phpt create mode 100644 ext/sockets/tests/socket_select-wrongparams-4.phpt create mode 100644 ext/sockets/tests/socket_select.phpt create mode 100644 ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt create mode 100644 ext/sockets/tests/socket_sentto_recvfrom_ipv6_udp.phpt create mode 100644 ext/sockets/tests/socket_sentto_recvfrom_unix.phpt create mode 100644 ext/sockets/tests/socket_set_block-retval.phpt create mode 100644 ext/sockets/tests/socket_set_block-wrongparams.phpt create mode 100644 ext/sockets/tests/socket_set_nonblock-retval.phpt create mode 100644 ext/sockets/tests/socket_set_nonblock-wrongparams.phpt create mode 100644 ext/sockets/tests/socket_set_option_error_socket_option.phpt create mode 100644 ext/sockets/tests/socket_set_option_rcvtimeo.phpt create mode 100644 ext/sockets/tests/socket_set_option_seolinger.phpt create mode 100644 ext/sockets/tests/socket_set_option_sndtimeo.phpt create mode 100644 ext/spl/tests/DirectoryIterator_getBasename_basic_test.phpt create mode 100644 ext/spl/tests/DirectoryIterator_getBasename_pass_array.phpt create mode 100644 ext/spl/tests/SplArray_fromArray.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_bottom_pass_array.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_bottom_pass_float.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_bottom_pass_integer.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_bottom_pass_null.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_count.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_count_param_SplDoublyLinkedList.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_current.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_current_empty.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_debug-info.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_getIteratorMode.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_getIteratorMode_error.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_isEmpty_empty-with-parameter.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_isEmpty_empty.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_isEmpty_not-empty-with-parameter.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_isEmpty_not-empty.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_lifoMode.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetExists_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetExists_success.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetGet_empty.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetGet_missing_param.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetGet_param_array.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetGet_param_string.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetSet_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetSet_one_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetUnset_greater_than_elements.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetUnset_negative-parameter.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_offsetUnset_parameter-larger-num-elements.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_pop_noParams.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_pop_params.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_push_missing_parameter.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_setIteratorMode_param_SplDoublyLinkedList.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_shift_noParams.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_top_pass_array.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_top_pass_float.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_top_pass_integer.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_top_pass_null.phpt create mode 100644 ext/spl/tests/SplDoublyLinkedList_unshift_missing_parameter.phpt create mode 100644 ext/spl/tests/SplDoublylinkedlist_offsetunset_first.phpt create mode 100644 ext/spl/tests/SplDoublylinkedlist_offsetunset_first002.phpt create mode 100644 ext/spl/tests/SplDoublylinkedlist_offsetunset_last.phpt create mode 100644 ext/spl/tests/SplFileObject_fflush_basic_001.phpt create mode 100644 ext/spl/tests/SplFileObject_fpassthru_basic.phpt create mode 100644 ext/spl/tests/SplFileObject_fscanf_basic.phpt create mode 100644 ext/spl/tests/SplFileObject_fseek_error_001.phpt create mode 100644 ext/spl/tests/SplFileObject_ftruncate_error_001.phpt create mode 100644 ext/spl/tests/SplFileObject_fwrite_error_001.phpt create mode 100644 ext/spl/tests/SplFileObject_fwrite_variation_001.phpt create mode 100644 ext/spl/tests/SplFileObject_fwrite_variation_002.phpt create mode 100644 ext/spl/tests/SplFileObject_fwrite_variation_003.phpt create mode 100644 ext/spl/tests/SplFileObject_getCsvControl_basic_001.phpt create mode 100644 ext/spl/tests/SplFileObject_seek_error_001.phpt create mode 100644 ext/spl/tests/SplFileObject_testinput.csv create mode 100644 ext/spl/tests/SplFixedArray__construct_param_array.phpt create mode 100644 ext/spl/tests/SplFixedArray__construct_param_float.phpt create mode 100644 ext/spl/tests/SplFixedArray__construct_param_null.phpt create mode 100644 ext/spl/tests/SplFixedArray__construct_param_string.phpt create mode 100644 ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt create mode 100644 ext/spl/tests/SplFixedArray_count_checkParams.phpt create mode 100644 ext/spl/tests/SplFixedArray_count_param_int.phpt create mode 100644 ext/spl/tests/SplFixedArray_current_param.phpt create mode 100644 ext/spl/tests/SplFixedArray_fromArray_invalid_parameter_001.phpt create mode 100644 ext/spl/tests/SplFixedArray_fromArray_invalid_parameter_002.phpt create mode 100644 ext/spl/tests/SplFixedArray_fromarray_indexes.phpt create mode 100644 ext/spl/tests/SplFixedArray_fromarray_non_indexes.phpt create mode 100644 ext/spl/tests/SplFixedArray_fromarray_param_boolean.phpt create mode 100644 ext/spl/tests/SplFixedArray_fromarray_param_multiarray.phpt create mode 100644 ext/spl/tests/SplFixedArray_getSize_pass_param.phpt create mode 100644 ext/spl/tests/SplFixedArray_key_param.phpt create mode 100644 ext/spl/tests/SplFixedArray_key_setsize.phpt create mode 100644 ext/spl/tests/SplFixedArray_next_param.phpt create mode 100644 ext/spl/tests/SplFixedArray_offsetExists_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplFixedArray_offsetExists_less_than_zero.phpt create mode 100644 ext/spl/tests/SplFixedArray_offsetGet_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplFixedArray_offsetSet_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplFixedArray_offsetSet_one_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplFixedArray_offsetUnset_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplFixedArray_offsetUnset_string.phpt create mode 100644 ext/spl/tests/SplFixedArray_rewind_param.phpt create mode 100644 ext/spl/tests/SplFixedArray_setSize_filled_to_smaller.phpt create mode 100644 ext/spl/tests/SplFixedArray_setSize_param_array.phpt create mode 100644 ext/spl/tests/SplFixedArray_setSize_param_float.phpt create mode 100644 ext/spl/tests/SplFixedArray_setSize_param_null.phpt create mode 100644 ext/spl/tests/SplFixedArray_setSize_reduce.phpt create mode 100644 ext/spl/tests/SplFixedArray_setsize_001.phpt create mode 100644 ext/spl/tests/SplFixedArray_setsize_grow.phpt create mode 100644 ext/spl/tests/SplFixedArray_setsize_shrink.phpt create mode 100644 ext/spl/tests/SplFixedArray_toArray_with-params.phpt create mode 100644 ext/spl/tests/SplFixedarray_offsetExists_larger.phpt create mode 100644 ext/spl/tests/SplHeap_count_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplHeap_extract_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplHeap_insert_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplHeap_isEmpty.phpt create mode 100644 ext/spl/tests/SplHeap_isEmpty_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplObjectStorage_addAll_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplObjectStorage_attach_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplObjectStorage_contains_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplObjectStorage_current_empty_storage.phpt create mode 100644 ext/spl/tests/SplObjectStorage_detach_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplObjectStorage_getInfo_empty_storage.phpt create mode 100644 ext/spl/tests/SplObjectStorage_offsetGet.phpt create mode 100644 ext/spl/tests/SplObjectStorage_offsetGet_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplObjectStorage_offsetGet_missing_object.phpt create mode 100644 ext/spl/tests/SplObjectStorage_removeAll_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplObjectStorage_setInfo_empty_storage.phpt create mode 100644 ext/spl/tests/SplObjectStorage_setInfo_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter1.phpt create mode 100644 ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter2.phpt create mode 100644 ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt create mode 100644 ext/spl/tests/SplPriorityQueue_extract_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplPriorityQueue_insert_invalid_parameter.phpt create mode 100644 ext/spl/tests/SplQueue_setIteratorMode.phpt create mode 100644 ext/spl/tests/SplQueue_setIteratorMode_param_lifo.phpt create mode 100644 ext/spl/tests/SplStack_setIteratorMode.phpt create mode 100644 ext/spl/tests/bug45622b.phpt create mode 100644 ext/spl/tests/bug47534.phpt create mode 100644 ext/spl/tests/bug48023.phpt create mode 100644 ext/spl/tests/bug48493.phpt create mode 100644 ext/spl/tests/dllist_010.phpt create mode 100644 ext/spl/tests/dllist_011.phpt create mode 100644 ext/spl/tests/dllist_memleak.phpt create mode 100644 ext/spl/tests/heap_corruption.phpt create mode 100644 ext/spl/tests/heap_current_variation_001.phpt create mode 100644 ext/spl/tests/heap_isempty_variation_001.phpt create mode 100644 ext/spl/tests/heap_it_current_empty.phpt create mode 100644 ext/spl/tests/heap_top_variation_001.phpt create mode 100644 ext/spl/tests/heap_top_variation_002.phpt create mode 100644 ext/spl/tests/heap_top_variation_003.phpt create mode 100644 ext/spl/tests/iterator_count.phpt create mode 100644 ext/spl/tests/iterator_to_array.phpt create mode 100644 ext/spl/tests/limititerator_seek.phpt create mode 100644 ext/spl/tests/pqueue_compare_basic.phpt create mode 100644 ext/spl/tests/pqueue_compare_error.phpt create mode 100644 ext/spl/tests/pqueue_current_error.phpt create mode 100644 ext/spl/tests/recursive_tree_iterator_setprefixpart.phpt create mode 100644 ext/spl/tests/recursiveiteratoriterator_beginiteration_basic.phpt create mode 100644 ext/spl/tests/recursiveiteratoriterator_enditeration_basic.phpt create mode 100644 ext/spl/tests/recursiveiteratoriterator_getsubiterator_basic.phpt create mode 100644 ext/spl/tests/recursiveiteratoriterator_getsubiterator_error.phpt create mode 100644 ext/spl/tests/recursiveiteratoriterator_getsubiterator_variation.phpt create mode 100644 ext/spl/tests/recursiveiteratoriterator_getsubiterator_variation_002.phpt create mode 100644 ext/spl/tests/recursiveiteratoriterator_getsubiterator_variation_003.phpt create mode 100644 ext/spl/tests/recursiveiteratoriterator_nextelement_basic.phpt create mode 100644 ext/spl/tests/regexiterator_getpregflags.phpt create mode 100644 ext/spl/tests/regexiterator_setflags_exception.phpt create mode 100644 ext/spl/tests/regexiterator_setpregflags.phpt create mode 100644 ext/spl/tests/regexiterator_setpregflags_exception.phpt create mode 100644 ext/spl/tests/spl_autoload_bug48541.phpt create mode 100644 ext/spl/tests/spl_caching_iterator_constructor_flags.phpt create mode 100644 ext/spl/tests/spl_cachingiterator___toString_basic.phpt create mode 100644 ext/spl/tests/spl_cachingiterator_setFlags_basic.phpt create mode 100644 ext/spl/tests/spl_classes.phpt create mode 100755 ext/spl/tests/spl_fileinfo_getlinktarget_basic.phpt create mode 100644 ext/spl/tests/spl_heap_count_basic.phpt create mode 100644 ext/spl/tests/spl_heap_count_error.phpt create mode 100644 ext/spl/tests/spl_heap_extract_parameter_error.phpt create mode 100644 ext/spl/tests/spl_heap_insert_basic.phpt create mode 100644 ext/spl/tests/spl_heap_is_empty_basic.phpt create mode 100644 ext/spl/tests/spl_heap_isempty.phpt create mode 100644 ext/spl/tests/spl_heap_iteration_error.phpt create mode 100644 ext/spl/tests/spl_heap_recoverfromcorruption_arguments.phpt create mode 100755 ext/spl/tests/spl_iterator_apply_error.phpt create mode 100755 ext/spl/tests/spl_iterator_apply_error_001.phpt create mode 100644 ext/spl/tests/spl_iterator_caching_count_basic.phpt create mode 100644 ext/spl/tests/spl_iterator_caching_count_error.phpt create mode 100644 ext/spl/tests/spl_iterator_caching_getcache_error.phpt create mode 100644 ext/spl/tests/spl_iterator_getcallchildren.phpt create mode 100644 ext/spl/tests/spl_iterator_iterator_constructor.phpt create mode 100644 ext/spl/tests/spl_iterator_recursive_getiterator_error.phpt create mode 100644 ext/spl/tests/spl_iterator_to_array_basic.phpt create mode 100755 ext/spl/tests/spl_iterator_to_array_error.phpt create mode 100644 ext/spl/tests/spl_limit_iterator_check_limits.phpt create mode 100644 ext/spl/tests/spl_maxheap_compare_basic.phpt create mode 100644 ext/spl/tests/spl_minheap_compare_error.phpt create mode 100644 ext/spl/tests/spl_pq_top_basic.phpt create mode 100644 ext/spl/tests/spl_pq_top_error_args.phpt create mode 100644 ext/spl/tests/spl_pq_top_error_corrupt.phpt create mode 100644 ext/spl/tests/spl_pq_top_error_empty.phpt create mode 100644 ext/spl/tests/spl_priorityqeue_insert_two_params_error.phpt create mode 100644 ext/spl/tests/spl_recursiveIteratorIterator_setMaxDepth_parameter_count.phpt create mode 100644 ext/spl/tests/spl_recursive_iterator_iterator_key_case.phpt create mode 100644 ext/spl/tests/splpriorityqueue_extract.phpt create mode 100644 ext/spl/tests/splpriorityqueue_setextractflags.phpt create mode 100644 ext/sqlite3/tests/sqlite3_02_open.phpt create mode 100644 ext/sqlite3/tests/sqlite3_31_changes.phpt create mode 100644 ext/sqlite3/tests/sqlite3_31_open.phpt create mode 100644 ext/sqlite3/tests/sqlite3_32_changes.phpt create mode 100644 ext/sqlite3/tests/sqlite3_32_createAggregate_paramCount.phpt create mode 100644 ext/sqlite3/tests/sqlite3_32_last_insert_rowid_param.phpt create mode 100644 ext/sqlite3/tests/sqlite3_33_createAggregate_notcallable.phpt create mode 100644 ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt create mode 100644 ext/sqlite3/tests/sqlite3_33_reset.phpt create mode 100644 ext/sqlite3/tests/sqlite3_34_load_extension_ext_dir.phpt create mode 100644 ext/sqlite3/tests/sqlite3_close_error.phpt create mode 100644 ext/sqlite3/tests/sqlite3_close_with_params.phpt create mode 100644 ext/sqlite3/tests/sqlite3_enable_exceptions.phpt create mode 100644 ext/sqlite3/tests/sqlite3_exec_wrongparams.phpt create mode 100644 ext/sqlite3/tests/sqlite3_lasterrorcode_with_params.phpt create mode 100644 ext/sqlite3/tests/sqlite3_lasterrormsg_with_params.phpt create mode 100644 ext/sqlite3/tests/sqlite3_loadextension_with_wrong_param.phpt create mode 100644 ext/sqlite3/tests/sqlite3_open_empty_string.phpt create mode 100644 ext/sqlite3/tests/sqlite3_openblob_wrongparams.phpt create mode 100644 ext/sqlite3/tests/sqlite3_prepare_faultystmt.phpt create mode 100644 ext/sqlite3/tests/sqlite3_prepare_with_empty_string.phpt create mode 100644 ext/sqlite3/tests/sqlite3_prepare_wrongparams.phpt create mode 100644 ext/sqlite3/tests/sqlite3_prepared_stmt_clear_with_params.phpt create mode 100644 ext/sqlite3/tests/sqlite3_query_error.phpt create mode 100644 ext/sqlite3/tests/sqlite3_querysingle_error.phpt create mode 100644 ext/sqlite3/tests/sqlite3_version_noparam.phpt create mode 100644 ext/sqlite3/tests/sqlite3result_fetcharray_with_two_params_fails.phpt create mode 100644 ext/sqlite3/tests/sqlite3result_numcolumns_error.phpt create mode 100644 ext/sqlite3/tests/sqlite3result_reset_with_params_fails.phpt create mode 100644 ext/sqlite3/tests/sqlite3stmt_reset_params.phpt delete mode 100644 ext/standard/CREDITS create mode 100644 ext/standard/tests/array/array_multisort_variation11.phpt create mode 100644 ext/standard/tests/array/bug44929.phpt create mode 100644 ext/standard/tests/array/bug48224.phpt create mode 100644 ext/standard/tests/class_object/AutoInterface.inc create mode 100644 ext/standard/tests/class_object/AutoLoaded.inc create mode 100644 ext/standard/tests/class_object/AutoTest.inc create mode 100644 ext/standard/tests/class_object/get_class_vars_error.phpt create mode 100644 ext/standard/tests/class_object/get_class_vars_variation1.phpt create mode 100644 ext/standard/tests/class_object/get_class_vars_variation2.phpt create mode 100644 ext/standard/tests/class_object/get_declared_classes_variation1.phpt create mode 100644 ext/standard/tests/class_object/get_declared_interfaces_variation1.phpt create mode 100644 ext/standard/tests/class_object/interface_exists_error.phpt create mode 100644 ext/standard/tests/class_object/interface_exists_variation1.phpt create mode 100644 ext/standard/tests/class_object/interface_exists_variation2.phpt create mode 100644 ext/standard/tests/class_object/interface_exists_variation3.phpt create mode 100644 ext/standard/tests/class_object/interface_exists_variation4.phpt create mode 100644 ext/standard/tests/class_object/is_subclass_of_variation_004.phpt create mode 100644 ext/standard/tests/class_object/property_exists_error.phpt create mode 100644 ext/standard/tests/class_object/property_exists_variation1.phpt create mode 100644 ext/standard/tests/file/bug41874.phpt create mode 100644 ext/standard/tests/file/bug41874_1.phpt create mode 100644 ext/standard/tests/file/bug41874_2.phpt create mode 100644 ext/standard/tests/file/bug41874_3.phpt create mode 100644 ext/standard/tests/file/bug44034.phpt create mode 100644 ext/standard/tests/file/bug47767.phpt create mode 100644 ext/standard/tests/file/link_win32.phpt create mode 100644 ext/standard/tests/file/windows_acls/bug44859.phpt create mode 100644 ext/standard/tests/file/windows_acls/bug44859_2.phpt create mode 100644 ext/standard/tests/file/windows_acls/bug44859_3.phpt create mode 100644 ext/standard/tests/file/windows_acls/bug44859_4.phpt create mode 100644 ext/standard/tests/file/windows_acls/common.inc create mode 100644 ext/standard/tests/file/windows_acls/tiny.bat create mode 100644 ext/standard/tests/file/windows_acls/tiny.exe create mode 100644 ext/standard/tests/filters/chunked_001.phpt create mode 100644 ext/standard/tests/general_functions/bug47857.phpt create mode 100644 ext/standard/tests/general_functions/bug47859.phpt create mode 100644 ext/standard/tests/general_functions/call_user_method.phpt create mode 100644 ext/standard/tests/general_functions/intval_variation1.phpt create mode 100644 ext/standard/tests/general_functions/intval_variation2.phpt create mode 100644 ext/standard/tests/http/bug38802.phpt create mode 100644 ext/standard/tests/http/ignore_errors.phpt create mode 100644 ext/standard/tests/http/server.inc create mode 100644 ext/standard/tests/math/abs_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/acos_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/acosh_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/asin_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/asinh_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/atan2_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/atan_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/atanh_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/bindec_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/ceil_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/cos_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/cosh_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/decbin_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/dechex_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/decoct_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/deg2rad_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/exp_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/expm1_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/floor_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/fmod_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/hexdec_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/hypot_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/is_finite_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/is_infinite_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/is_nan_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/log10_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/log1p_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/log_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/octdec_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/pow_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/rad2deg_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/round_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/sin_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/sinh_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/sqrt_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/tan_basiclong_64bit.phpt create mode 100644 ext/standard/tests/math/tanh_basiclong_64bit.phpt create mode 100644 ext/standard/tests/misc/browsernames.inc delete mode 100644 ext/standard/tests/misc/browsernames.php create mode 100644 ext/standard/tests/misc/time_nanosleep_basic.phpt create mode 100644 ext/standard/tests/misc/time_nanosleep_error1.phpt create mode 100644 ext/standard/tests/misc/time_nanosleep_error2.phpt create mode 100644 ext/standard/tests/misc/time_nanosleep_error3.phpt create mode 100644 ext/standard/tests/misc/time_nanosleep_error4.phpt create mode 100644 ext/standard/tests/misc/time_nanosleep_error5.phpt create mode 100644 ext/standard/tests/network/gethostbyname_basic001.phpt create mode 100644 ext/standard/tests/network/gethostbyname_basic002.phpt create mode 100644 ext/standard/tests/network/gethostbyname_error001.phpt create mode 100644 ext/standard/tests/network/gethostbyname_error002.phpt create mode 100644 ext/standard/tests/network/gethostbyname_error003.phpt create mode 100644 ext/standard/tests/network/gethostbyname_error004.phpt create mode 100644 ext/standard/tests/network/gethostbyname_error005.phpt create mode 100644 ext/standard/tests/network/gethostbyname_error006.phpt create mode 100644 ext/standard/tests/streams/bug47997.phpt create mode 100644 ext/standard/tests/streams/bug48309.phpt create mode 100644 ext/standard/tests/streams/stream_copy_to_stream_socket.phpt delete mode 100644 ext/standard/tests/strings/bug47546.phpt create mode 100644 ext/standard/tests/strings/strcoll.phpt create mode 100644 ext/standard/tests/strings/strcoll_error.phpt delete mode 100644 ext/standard/tests/url/parse_url_variation_002.phpt create mode 100644 ext/standard/tests/url/parse_url_variation_002_32bit.phpt create mode 100644 ext/standard/tests/url/parse_url_variation_002_64bit.phpt create mode 100644 ext/standard/tests/versioning/php_sapi_name.phpt create mode 100644 ext/standard/tests/versioning/php_sapi_name_variation001.phpt create mode 100644 ext/wddx/tests/bug48562.phpt create mode 100644 ext/xmlrpc/tests/bug44996.phpt create mode 100644 ext/xmlrpc/tests/bug47818.phpt create mode 100644 ext/xmlwriter/tests/bug48204.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_open_uri_error_001.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_open_uri_error_002.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_open_uri_error_003.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_open_uri_error_004.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_open_uri_error_005.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_set_indent_string_basic_001.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_set_indent_string_error_001.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_write_attribute_ns_basic_001.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_write_dtd_basic_001.phpt create mode 100644 ext/xmlwriter/tests/xmlwriter_write_dtd_error_001.phpt create mode 100644 ext/xsl/tests/bug48221.phpt create mode 100644 ext/xsl/tests/phpfunc-nostring.xsl create mode 100644 ext/xsl/tests/phpfunc-undef.xsl create mode 100644 ext/xsl/tests/phpfunc.xsl create mode 100644 ext/xsl/tests/xsl-phpinfo.phpt create mode 100644 ext/xsl/tests/xsltprocessor_getParameter-invalidparam.phpt create mode 100644 ext/xsl/tests/xsltprocessor_getParameter-wrongparam.phpt create mode 100644 ext/xsl/tests/xsltprocessor_getParameter.phpt create mode 100644 ext/xsl/tests/xsltprocessor_registerPHPFunctions-allfuncs.phpt create mode 100644 ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-multiple.phpt create mode 100644 ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-notallowed.phpt create mode 100644 ext/xsl/tests/xsltprocessor_registerPHPFunctions-array.phpt create mode 100644 ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt create mode 100644 ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt create mode 100644 ext/xsl/tests/xsltprocessor_registerPHPFunctions-null.phpt create mode 100644 ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt create mode 100644 ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-notallowed.phpt create mode 100644 ext/xsl/tests/xsltprocessor_registerPHPFunctions-string.phpt create mode 100644 ext/xsl/tests/xsltprocessor_removeParameter-invalidparam.phpt create mode 100644 ext/xsl/tests/xsltprocessor_removeParameter-wrongparams.phpt create mode 100644 ext/xsl/tests/xsltprocessor_removeParameter.phpt create mode 100644 ext/xsl/tests/xsltprocessor_setparameter-errorquote.phpt create mode 100644 ext/xsl/tests/xsltprocessor_setparameter-nostring.phpt create mode 100644 ext/zlib/tests/008.phpt delete mode 100644 ext/zlib/tests/bug.tar delete mode 100644 ext/zlib/tests/bug_40189_2.phpt create mode 100644 scripts/dev/generate-phpt.phar create mode 100755 scripts/dev/generate-phpt/build.xml create mode 100644 scripts/dev/generate-phpt/gtPackage.php create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/array.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/boolean.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/commentEnd.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/commentStart.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/emptyUnsetUndefNull.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/float.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/int.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/loopClose.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/loopStart.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/object.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/skipif64b.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/skipifnot64b.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/skipifnotwin.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/skipifwin.txt create mode 100644 scripts/dev/generate-phpt/src/codeSnippets/string.txt create mode 100644 scripts/dev/generate-phpt/src/generate-phpt.php create mode 100644 scripts/dev/generate-phpt/src/gtAutoload.php create mode 100644 scripts/dev/generate-phpt/src/gtClassMap.php create mode 100644 scripts/dev/generate-phpt/src/gtCodeSnippet.php create mode 100644 scripts/dev/generate-phpt/src/gtFunction.php create mode 100644 scripts/dev/generate-phpt/src/gtMethod.php create mode 100644 scripts/dev/generate-phpt/src/gtTestCaseWriter.php create mode 100644 scripts/dev/generate-phpt/src/gtTestSubject.php create mode 100644 scripts/dev/generate-phpt/src/gtText.php create mode 100644 scripts/dev/generate-phpt/src/setup/exceptions/gtMissingArgumentException.php create mode 100644 scripts/dev/generate-phpt/src/setup/exceptions/gtMissingOptionsException.php create mode 100644 scripts/dev/generate-phpt/src/setup/exceptions/gtUnknownOptionException.php create mode 100644 scripts/dev/generate-phpt/src/setup/exceptions/gtUnknownSectionException.php create mode 100644 scripts/dev/generate-phpt/src/setup/gtCommandLineOptions.php create mode 100644 scripts/dev/generate-phpt/src/setup/gtOptionalSections.php create mode 100644 scripts/dev/generate-phpt/src/setup/gtPreCondition.php create mode 100644 scripts/dev/generate-phpt/src/setup/gtPreConditionList.php create mode 100644 scripts/dev/generate-phpt/src/setup/preconditions/gtIfClassHasMethod.php create mode 100644 scripts/dev/generate-phpt/src/setup/preconditions/gtIsSpecifiedFunctionOrMethod.php create mode 100644 scripts/dev/generate-phpt/src/setup/preconditions/gtIsSpecifiedTestType.php create mode 100644 scripts/dev/generate-phpt/src/setup/preconditions/gtIsValidClass.php create mode 100644 scripts/dev/generate-phpt/src/setup/preconditions/gtIsValidFunction.php create mode 100644 scripts/dev/generate-phpt/src/setup/preconditions/gtIsValidMethod.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtBasicTestCase.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtBasicTestCaseFunction.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtBasicTestCaseMethod.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtErrorTestCase.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtErrorTestCaseFunction.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtErrorTestCaseMethod.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtTestCase.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtVariationContainer.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtVariationContainerFunction.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtVariationContainerMethod.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtVariationTestCase.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtVariationTestCaseFunction.php create mode 100644 scripts/dev/generate-phpt/src/testcase/gtVariationTestCaseMethod.php create mode 100644 scripts/dev/generate-phpt/src/texts/functionOrMethodNotSpecified.txt create mode 100644 scripts/dev/generate-phpt/src/texts/help.txt create mode 100644 scripts/dev/generate-phpt/src/texts/methodNotSpecified.txt create mode 100644 scripts/dev/generate-phpt/src/texts/testTypeNotSpecified.txt create mode 100644 scripts/dev/generate-phpt/src/texts/unknownClass.txt create mode 100644 scripts/dev/generate-phpt/src/texts/unknownFunction.txt create mode 100644 scripts/dev/generate-phpt/src/texts/unknownMethod.txt create mode 100644 scripts/dev/generate-phpt/tests/gtBasicTestCaseFunctionTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtBasicTestCaseMethodTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtCodeSnippetTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtCommandLineOptionsTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtErrorTestCaseFunctionTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtErrorTestCaseMethodTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtFunctionTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtIfClassHasMethodTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtIsSpecifiedFunctionOrMethodTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtIsSpecifiedTestTypeTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtIsValidClassTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtIsValidFunctionTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtIsValidMethodTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtMethodTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtOptionalSectionsTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtVariationTestCaseFunctionTest.php create mode 100644 scripts/dev/generate-phpt/tests/gtVariationTestCaseMethodTest.php delete mode 100644 scripts/dev/generate_phpt.php create mode 100644 tests/classes/interface_optional_arg_003.inc create mode 100644 tests/classes/interface_optional_arg_003.phpt create mode 100644 tests/classes/iterators_008.phpt create mode 100644 tests/classes/static_properties_undeclared_assign.phpt create mode 100644 tests/classes/static_properties_undeclared_assignInc.phpt create mode 100644 tests/classes/static_properties_undeclared_assignRef.phpt create mode 100644 tests/classes/static_properties_undeclared_inc.phpt create mode 100644 tests/classes/static_properties_undeclared_isset.phpt create mode 100644 tests/classes/static_properties_undeclared_read.phpt create mode 100644 tests/func/ini_alter.phpt create mode 100644 tests/lang/045.phpt create mode 100644 tests/lang/compare_objects_basic1.phpt create mode 100644 tests/lang/compare_objects_basic2.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_001.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_002.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_003.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_004.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_005.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_006.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_007.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_008.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_009.phpt create mode 100644 tests/lang/execution_order.phpt create mode 100644 tests/lang/foreachLoop.001.phpt create mode 100644 tests/lang/foreachLoop.002.phpt create mode 100644 tests/lang/foreachLoop.003.phpt create mode 100644 tests/lang/foreachLoop.004.phpt create mode 100644 tests/lang/foreachLoop.005.phpt create mode 100644 tests/lang/foreachLoop.006.phpt create mode 100644 tests/lang/foreachLoop.007.phpt create mode 100644 tests/lang/foreachLoop.008.phpt create mode 100644 tests/lang/foreachLoop.009.phpt create mode 100644 tests/lang/foreachLoop.010.phpt create mode 100644 tests/lang/foreachLoop.011.phpt create mode 100644 tests/lang/foreachLoop.012.phpt create mode 100644 tests/lang/foreachLoop.013.phpt create mode 100644 tests/lang/foreachLoop.014.phpt create mode 100644 tests/lang/foreachLoop.015.phpt create mode 100644 tests/lang/foreachLoop.016.phpt create mode 100644 tests/lang/foreachLoop.017.phpt create mode 100644 tests/lang/foreachLoopIterator.001.phpt create mode 100644 tests/lang/foreachLoopIterator.002.phpt create mode 100644 tests/lang/foreachLoopIteratorAggregate.001.phpt create mode 100644 tests/lang/foreachLoopIteratorAggregate.002.phpt create mode 100644 tests/lang/foreachLoopIteratorAggregate.003.phpt create mode 100644 tests/lang/foreachLoopIteratorAggregate.004.phpt create mode 100644 tests/lang/foreachLoopObjects.001.phpt create mode 100644 tests/lang/foreachLoopObjects.002.phpt create mode 100644 tests/lang/foreachLoopObjects.003.phpt create mode 100644 tests/lang/foreachLoopObjects.004.phpt create mode 100644 tests/lang/foreachLoopObjects.005.phpt create mode 100644 tests/lang/foreachLoopObjects.006.phpt create mode 100644 tests/lang/operators/add_basiclong_64bit.phpt create mode 100644 tests/lang/operators/add_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseAnd_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseAnd_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseNot_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseNot_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseOr_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseOr_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseShiftLeft_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt create mode 100644 tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseShiftRight_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseXor_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseXor_variationStr.phpt create mode 100644 tests/lang/operators/divide_basiclong_64bit.phpt create mode 100644 tests/lang/operators/divide_variationStr.phpt create mode 100644 tests/lang/operators/modulus_basiclong_64bit.phpt create mode 100644 tests/lang/operators/modulus_variationStr.phpt create mode 100644 tests/lang/operators/multiply_basiclong_64bit.phpt create mode 100644 tests/lang/operators/multiply_variationStr.phpt create mode 100644 tests/lang/operators/negate_basiclong_64bit.phpt create mode 100644 tests/lang/operators/negate_variationStr.phpt create mode 100644 tests/lang/operators/operator_equals_basic.phpt create mode 100644 tests/lang/operators/operator_equals_variation.phpt create mode 100644 tests/lang/operators/operator_equals_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_gt_basic.phpt create mode 100644 tests/lang/operators/operator_gt_or_equal_basic.phpt create mode 100644 tests/lang/operators/operator_gt_or_equal_variation.phpt create mode 100644 tests/lang/operators/operator_gt_or_equal_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_gt_variation.phpt create mode 100644 tests/lang/operators/operator_gt_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_identical_basic.phpt create mode 100644 tests/lang/operators/operator_identical_variation.phpt create mode 100644 tests/lang/operators/operator_identical_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_lt_basic.phpt create mode 100644 tests/lang/operators/operator_lt_or_equal_basic.phpt create mode 100644 tests/lang/operators/operator_lt_or_equal_variation.phpt create mode 100644 tests/lang/operators/operator_lt_or_equal_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_lt_variation.phpt create mode 100644 tests/lang/operators/operator_lt_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_notequals_basic.phpt create mode 100644 tests/lang/operators/operator_notequals_variation.phpt create mode 100644 tests/lang/operators/operator_notequals_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_notidentical_basic.phpt create mode 100644 tests/lang/operators/operator_notidentical_variation.phpt create mode 100644 tests/lang/operators/operator_notidentical_variation_64bit.phpt create mode 100644 tests/lang/operators/postdec_basiclong_64bit.phpt create mode 100644 tests/lang/operators/postdec_variationStr.phpt create mode 100644 tests/lang/operators/postinc_basiclong_64bit.phpt create mode 100644 tests/lang/operators/postinc_variationStr.phpt create mode 100644 tests/lang/operators/predec_basiclong_64bit.phpt create mode 100644 tests/lang/operators/predec_variationStr.phpt create mode 100644 tests/lang/operators/preinc_basiclong_64bit.phpt create mode 100644 tests/lang/operators/preinc_variationStr.phpt create mode 100644 tests/lang/operators/subtract_basiclong_64bit.phpt create mode 100644 tests/lang/operators/subtract_variationStr.phpt create mode 100644 tests/lang/returnByReference.001.phpt create mode 100644 tests/lang/returnByReference.002.phpt create mode 100644 tests/lang/returnByReference.003.phpt create mode 100644 tests/lang/returnByReference.004.phpt create mode 100644 tests/lang/returnByReference.005.phpt create mode 100644 tests/lang/returnByReference.006.phpt create mode 100644 tests/lang/returnByReference.007.phpt create mode 100644 tests/lang/returnByReference.008.phpt create mode 100644 tests/lang/returnByReference.009.phpt create mode 100644 tests/output/ob_001.phpt create mode 100644 tests/output/ob_002.phpt create mode 100644 tests/output/ob_003.phpt create mode 100644 tests/output/ob_004.phpt create mode 100644 tests/output/ob_005.phpt create mode 100644 tests/output/ob_006.phpt create mode 100644 tests/output/ob_007.phpt create mode 100644 tests/output/ob_008.phpt create mode 100644 tests/output/ob_009.phpt create mode 100644 tests/output/ob_010.phpt create mode 100644 tests/output/ob_get_status.phpt (limited to 'ext/pcre/php_pcre.c') diff --git a/EXTENSIONS b/EXTENSIONS index 60811e5fa..0ccacf8bd 100644 --- a/EXTENSIONS +++ b/EXTENSIONS @@ -169,7 +169,7 @@ STATUS: Working COMMENT: Working ------------------------------------------------------------------------------- EXTENSION: pdo -PRIMARY MAINTAINER: Unknown +PRIMARY MAINTAINER: Ilia Alshanetsky , Wez Furlong MAINTENANCE: Odd fixes STATUS: Working SINCE: 5.1 @@ -211,7 +211,7 @@ STATUS: Working SINCE: 5.1 ------------------------------------------------------------------------------- EXTENSION: pdo_sqlite -PRIMARY MAINTAINER: Unknown +PRIMARY MAINTAINER: Ilia Alshanetsky MAINTENANCE: Odd fixes STATUS: Working SINCE: 5.1 @@ -223,7 +223,7 @@ STATUS: Working COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less have fatal bug. ------------------------------------------------------------------------------- EXTENSION: sqlite -PRIMARY MAINTAINER: Marcus Boerger , Wez Furlong +PRIMARY MAINTAINER: Marcus Boerger , Wez Furlong , Ilia Alshanetsky MAINTENANCE: Maintained STATUS: Working SINCE: 5.0 (Since 4.3.2 in PECL) diff --git a/NEWS b/NEWS index 15ac567d8..fbdcf8735 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,140 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +18 Jun 2009, PHP 5.3.0 RC 4 +- Upgraded bundled sqlite to version 3.6.15. (Scott) + +- Added phar.phar generation for Windows. (Greg) +- Added ACL Cache support on Windows. + (Kanwaljeet Singla, Pierre, Venkat Raman Don) + +- Fixed readlink on Windows in thread safe SAPI (apache2.x etc.). (Pierre) + +- Fixed bug #48578 (Can't build 5.3 on FBSD 4.11). (Rasmus) +- Fixed bug #48541 (spl_autoload_register only registers first closure, then + leaks the others). (Greg) +- Fixed bug #48535 (file_exists returns false when impersonate is used). + (Kanwaljeet Singla, Venkat Raman Don) +- Fixed bug #48533 (__callStatic is not invoked for private/protected methods). + (Felipe) +- Fixed bug #47767 (include_once does not resolve windows symlinks or junctions) + (Kanwaljeet Singla, Venkat Raman Don) +- Fixed bug #47318 (UMR when trying to activate user config). (Pierre) + +11 Jun 2009, PHP 5.3.0 RC 3 +- Upgraded bundled sqlite to version 3.6.14.2. (Scott, Ilia) +- Upgraded bundled libmagic to 5.03 in the fileinfo extension. (Scott) + +- Removed all zend_extension_* php.ini directives. Zend extensions are now + always loaded using zend_extension directive. (Derick) + +- Changed SQLite3::loadExtension() to be disabled for threaded SAPIs. (Scott) + +- Added constants based on Windows' GetVersionEx information. + PHP_WINDOWS_VERSION_* and PHP_WINDOWS_NT_*. (Pierre) +- Added the ability for json_decode() to take a user specified depth. (Scott) +- Added support for the mysql_stmt_next_result() function from libmysql. + (Andrey) +- Added support for ACL (is_writable, is_readable, reports now correct results) + on Windows. (Pierre, Venkat Raman Don, Kanwaljeet Singla) + +- Fixed bug #48493 (spl_autoload_register() doesn't work correctly when + prepending functions). (Scott) +- Fixed bug #48257 (PharData throws exception with non-phar tar). (Greg) +- Fixed bug #48227 (NumberFormatter::format leaks memory). (Felipe) +- Fixed bug #48200 (compile failure with mbstring.c when + --enable-zend-multibyte is used). (Jani) +- Fixed bug #48188 (Cannot execute a scrollable cursors twice with + PDO_PGSQL). (Matteo) +- Fixed bug #41874 (separate STDOUT and STDERR in exec functions). + (Kanwaljeet Singla, Venkat Raman Don, Pierre) +- Fixed bug #38802 (max_redirects and ignore_errors). + (patch by datibbaw@php.net) +- Fixed isset() on phar sub-directories (isset($phar["blah"]) if + file "blah/foo.php" exists in the phar archive). (Greg) +- Fixed security vulnerability in phar's handling of long tar filenames. (Greg) +- Fixed potential segfault with converting phars containing metadata to other + formats. (Greg) + + +07 May 2009, PHP 5.3.0 RC 2 +- Upgraded bundled sqlite to version 3.6.13. (Ilia) +- Upgraded bundled PCRE to version 7.9. (Nuno) +- Upgraded bundled libmagic to 5.02 in the fileinfo extension. (Scott) + +- Undeprecated ticks. (Arnaud) + +- Improved IMAP support (Pierre): + . Added imap_gc() to clear the imap cache + . Added imap_utf8_to_mutf7() and imap_mutf7_to_utf8() + +- Implemented FR #41712 (curl progress callback: CURLOPT_PROGRESSFUNCTION). + (sdteffen[at]gmail[dot].com, Pierre) +- Implemented FR #47739 (Missing cURL option do disable IPv6). (Pierre) +- Implemented FR #39637 (Missing cURL option CURLOPT_FTP_FILEMETHOD). (Pierre) + +- Added timezone_version_get() to retrieve the version of the used timezone + database. (Derick) +- Added 'n' flag to fopen to allow passing O_NONBLOCK to the underlying + open(2) system call. (Mikko) +- Added "dechunk" filter which can decode HTTP responses with chunked + transfer-encoding. HTTP streams use this filter automatically in case + "Transfer-Encoding: chunked" header is present in response. It's possible to + disable this behaviour using "http"=>array("auto_decode"=>0) in stream + context. (Dmitry) +- Added ability to throw exceptions from SQLite3 instead of warnings. (Scott) +- Added startup notices for deprecated ini settings. (Kalle) + +- Fixed bug #48185 (warning: value computed is not used in + pdo_sqlite_stmt_get_col line 271). (Matteo) +- Fixed bug #48087 (call_user_method() invalid free of arguments). (Felipe) +- Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo) +- Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long). (Dmitry) +- Fixed bug #48023 (spl_autoload_register didn't store closures). (Etienne) +- Fixed bug #48004 (Error handler prevents creation of default object). + (Dmitry) +- Fixed bug #47880 (crashes in call_user_func_array()). (Dmitry) +- Fixed bug #47856 (stristr() converts needle to lower-case). (Ilia) +- Fixed bug #47851 (is_callable throws fatal error). (Dmitry) +- Fixed bug #47819 (Getting pdo_mysql.so: undefined symbol: mysqlnd_debug_init + at startup). (Johannes) +- Fixed bug #47816 (pcntl tests failing on NetBSD). (Matteo) +- Fixed bug #47779 (Wrong value for SIG_UNBLOCK and SIG_SETMASK constants). + (Matteo) +- Fixed bug #47771 (Exception during object construction from arg call calls + object's destructor). (Dmitry) +- Fixed bug #47745 (FILTER_VALIDATE_INT doesn't allow minimum integer). + (Dmitry) +- Fixed bug #47714 (autoloading classes inside exception_handler leads to + crashes). (Dmitry) +- Fixed bug #47699 (autoload and late static binding). (Dmitry) +- Fixed bug #47662 (Support more than 127 subpatterns in preg_match). (Nuno) +- Fixed bug #47596 (Bus error on parsing file). (Dmitry) +- Fixed bug #47560 (explode()'s limit parameter odd behaviour). (Matt) +- Fixed bug #47535 (Compilation failure in ps_fetch_from_1_to_8_bytes()). + (Johannes) +- Fixed bug #47534 (RecursiveDiteratoryIterator::getChildren ignoring + CURRENT_AS_PATHNAME). (Etienne) +- Fixed bug #47516 (nowdoc can not be embed in heredoc but can be embed in + double quote). (Dmitry) +- Fixed bug #47038 (Memory leak in include). (Dmitry) +- Fixed bug #47021 (SoapClient stumbles over WSDL delivered with + "Transfer-Encoding: chunked"). (Dmitry) +- Fixed bug #46817 (tokenizer misses last single-line comment (PHP 5.3+, with + re2c lexer)). (Matt, Shire) +- Fixed bug #46108 (DateTime - Memory leak when unserializing). (Felipe) +- Fixed bug #44861 (scrollable cursor don't work with pgsql). (Matteo) +- Fixed bug #44409 (PDO::FETCH_SERIALIZE calls __construct()). (Matteo) +- Fixed bug #44173 (PDO->query() parameter parsing/checking needs an + update). (Matteo) +- Fixed bug #42362 (HTTP status codes 204 and 304 should not be gzipped). + (Scott, Edward Z. Yang) +- Fixed PECL bug #16338 (phar extension uses php_stream_copy_to_stream). (Greg) +- Fixed PECL bug #14646 (phar error message unclear with php stream wrappers). + (Greg) +- Fixed an issue with ReflectionProperty::setAccessible(). + (Sebastian, Roman Borschel) + + 24 Mar 2009, PHP 5.3.0 RC 1 - Upgraded bundled sqlite to version 3.6.11. (Scott) - Upgraded bundled libmagic to 5.00 in the fileinfo extension. (Scott) @@ -12,6 +147,7 @@ PHP NEWS - Added support for CP850 encoding in mbstring extension. (Denis Giffeler, Moriyoshi) +- Fixed bug #47757 (rename JPG to JPEG in phpinfo). (Pierre) - Fixed bug #47678 (Allow loadExtension to be disabled in SQLite3). (Scott) - Fixed bug #47671 (Cloning SplObjectStorage instances). (Etienne) - Fixed bug #47664 (get_class returns NULL instead of FALSE). (Dmitry) @@ -20,7 +156,7 @@ PHP NEWS - Fixed bug #47572 (Undefined constant causes segmentation fault). (Felipe) - Fixed bug #47549 (get_defined_constants() return array with broken array categories). (Ilia) -- Fixed Bug #47443 (metaphone('scratch') returns wrong result). (Felipe) +- Fixed bug #47443 (metaphone('scratch') returns wrong result). (Felipe) - Fixed bug #47438 (mysql_fetch_field ignores zero offset). (Johannes) - Fixed bug #47398 (PDO_Firebird doesn't implements quoter correctly). (Felipe) - Fixed bug #47390 (odbc_fetch_into - BC in php 5.3.0). (Felipe) @@ -49,7 +185,7 @@ PHP NEWS - Fixed bug #46347 (parse_ini_file() doesn't support * in keys). (Nuno) - Fixed bug #46048 (SimpleXML top-level @attributes not part of iterator). (David C.) -- Fixed bug #45877 (Array key '2147483647' left as string). (Matt) +- Fixed bug #45682 (Unable to var_dump(DateInterval)). (Derick) - Fixed bug #45432 (PDO: persistent connection leak). (Felipe) - Fixed bug #43831 ($this gets mangled when extending PDO with persistent connection). (Felipe) @@ -60,6 +196,7 @@ PHP NEWS - Fixed PECL Bug #14268 (Allow "pecl install oci8" command to "autodetect" an Instant Client RPM install) (Chris Jones/Oracle Corp.) + 29 Jan 2009, PHP 5.3.0 Beta 1 - Upgraded bundled sqlite to version 3.6.10. (Scott, Ilia) @@ -155,6 +292,7 @@ PHP NEWS - Fixed bug #45820 (Allow empty keys in ArrayObject). (Etienne) - Fixed bug #45791 (json_decode() doesn't convert 0e0 to a double). (Scott) + 04 Dec 2008, PHP 5.3.0 Alpha 3 - Upgraded bundled PCRE to version 7.8. (Nuno) - Upgraded bundled sqlite to version 3.6.6.2. (Scott, Ilia) @@ -188,9 +326,6 @@ PHP NEWS (Keisial at gmail dot com, Greg) - Added support for using compressed connections with PDO_mysql. (Johannes) -- Implemented FR #46595 (Use cc as the default compiler). (David Soria Parra) -- Implemented FR #46513 (Missing compiler flags for suncc). (David Soria Parra) - - Deprecated define_syslog_variables(). (Kalle) - Deprecated ereg extension. (Felipe) @@ -436,7 +571,6 @@ PHP NEWS - Improved streams: . Fixed confusing error message on failure when no errors are logged. (Greg) . Added stream_supports_lock() function. (Benjamin Schulz) - . Added "ignore_errors" option to http fopen wrapper. (David Zulke, Sara) . Added context parameter for copy() function. (Sara) . Added "glob://" stream wrapper. (Marcus) . Added "params" as optional parameter for stream_context_create(). (Sara) @@ -485,7 +619,7 @@ PHP NEWS . Added pcntl_sigtimedwait(). - Improved SOAP extension: - . Added support for element names in context of XMLShema's . (Dmitry) + . Added support for element names in context of XMLSchema's . (Dmitry) . Added ability to use Traversable objects instead of plain arrays. (Joshua Reese, Dmitry) . Fixed possible crash bug caused by an uninitialized value. (Zdash Urf) @@ -610,13 +744,8 @@ PHP NEWS - Fixed PECL bug #12794 (PDOStatement->nextRowset() doesn't work). (Johannes) - Fixed PECL bug #12401 (Add support for ATTR_FETCH_TABLE_NAMES). (Johannes) -- Fixed bug #45622 (isset($arrayObject->p) misbehaves with ArrayObject:: - ARRAY_AS_PROPS set). (robin_fernandes at uk dot ibm dot com, Arnaud) -- Fixed bug #45614 (ArrayIterator::current(), ::key() can show 1st private - prop of wrapped object). (robin_fernandes at uk dot ibm dot com, Arnaud) - Fixed bug #45571 (ReflectionClass::export() shows superclasses' private static methods). (robin_fernandes at uk dot ibm dot com) -- Fixed bug #45540 (stream_context_create creates bad http request). (Arnaud) - Fixed bug #45430 (windows implementation of crypt is not thread safe). (Pierre) - Fixed bug #45345 (SPLFileInfo::getPathInfo() returning dir info instead of @@ -651,8 +780,6 @@ PHP NEWS connections). (Martin Jansen) - Fixed bug #44257 (timelib_tz_lookup_table must use float for gmtoffset). (Derick, iuri dot fiedoruk at hp dot com). -- Fixed bug #44214 (Crash using preg_replace_callback() and global variable). - (Nuno, Scott) - Fixed bug #44034 (FILE_IGNORE_NEW_LINES in file() does not work as expected when lines end in \r\n). (Ilia) - Fixed bug #43960 (strtotime() returns timestamp in the future when given a @@ -683,8 +810,6 @@ PHP NEWS - Fixed bug #42848 (Status: header incorrect under FastCGI). (Dmitry) - Fixed bug #42773 (WSDL error causes HTTP 500 Response). (Dmitry) - Fixed bug #42736 (xmlrpc_server_call_method() crashes). (Tony) -- Fixed bug #42663 (gzinflate() try to allocate all memory with truncated - data). (Arnaud) - Fixed bug #42657 (ini_get() returns incorrect value when default is NULL). (Jani, Scott) - Fixed bug #42637 (SoapFault : Only http and https are allowed). (Bill Moran) diff --git a/README.PARAMETER_PARSING_API b/README.PARAMETER_PARSING_API index 530b2b560..8d297670c 100644 --- a/README.PARAMETER_PARSING_API +++ b/README.PARAMETER_PARSING_API @@ -48,6 +48,7 @@ Type specifiers h - array (returned as HashTable*) H - array or HASH_OF(object) (returned as HashTable*) l - long (long) + L - long, limits out-of-range numbers to LONG_MAX/LONG_MIN (long) o - object of any type (zval*) O - object of specific type given by class entry (zval*, zend_class_entry) r - resource (zval*) diff --git a/README.RELEASE_PROCESS b/README.RELEASE_PROCESS index a2733ce5a..25f9ec115 100644 --- a/README.RELEASE_PROCESS +++ b/README.RELEASE_PROCESS @@ -114,21 +114,17 @@ commit this. 1. Update in ``php-bugs-web/include/functions.inc`` the ``show_version_option`` function to include the new RC and commit. -2. Run the bumpRelease script for phpweb in your local checkout - - a. ``php bin/bumpRelease 5`` (or ``php bin/bumpRelease 4`` for PHP4) - -3. Update ``phpweb/include/version.inc`` (x=major version number) +2. Update ``phpweb/include/version.inc`` (x=major version number) a. ``$PHP_x_RC`` = "5.3.0RC1" b. ``$PHP_x_RC_DATE`` = "06 September 2007" -4. Commit those changes: +3. Commit those changes: a. ``cvs commit include/version.inc include/releases.inc`` -5. For the first RC, write the doc team (phpdoc@lists.php.net) about updating the +4. For the first RC, write the doc team (phpdoc@lists.php.net) about updating the INSTALL and win32/install.txt files which are generated from the PHP manual sources. Rolling a stable release @@ -252,4 +248,37 @@ number, and remove the RC from there. II. For PHP5: Set $CURRENT_QA_RELEASE_5 to false -12. Rebuild the English and Japanese docs (ask Derick) + +Re-releasing the same version (or -pl) +------------------------------------ + +1. Commit the new binaries to ``phpweb/distributions/`` + +2. Edit ``phpweb/include/version.inc`` and change (X=major release number): + + a. If only releasing for one OS, make sure you edit only those variables + + b. ``$PHP_X_VERSION`` to the correct version + + c. ``$PHP_X_DATE`` to the release date + + d. ``$PHP_X_MD5`` array and update all the md5 sums + + e. Make sure there are no outdated "notes" or edited "date" keys in the + ``$RELEASES[X][$PHP_X_VERSION]["source"]`` array + +3. Add a short notice to phpweb stating that there is a new release, and +highlight the major important things (security fixes) and when it is important +to upgrade. + + a. Call php bin/createNewsEntry in your local phpweb checkout + + b. Add the content for the news entry + +4. Commit all the changes (``include/version.inc``, ``archive/archive.xml``, +``archive/entries/YYYY-MM-DD-N.xml``) + +5. Wait an hour or two, then send a mail to php-announce@lists.php.net, +php-general@lists.php.net and internals@lists.php.net with a text similar to +the news entry. + diff --git a/README.UPDATE_5_2 b/README.UPDATE_5_2 deleted file mode 100644 index a7dfe7bca..000000000 --- a/README.UPDATE_5_2 +++ /dev/null @@ -1,1022 +0,0 @@ -PHP 5.2 UPDATE INFO - -=============================== -Changes in PHP datetime support -=============================== - -Since PHP 5.1, there has been an extension named 'date' in the PHP core. This -is the new implementation of PHP's datetime support. Although it will attempt -to guess your system's timezone setting, you should set the timezone manually. -You can do this in any of three ways: - -1) in your php.ini using the date.timezone INI directive -2) on your system using the TZ environmental variable -3) from your script using the convenience function date_default_timezone_set() - -All supported timezones are listed in the PHP Manual at -http://www.php.net/manual/timezones.php. - -With the advent of PHP 5.2, there are object representations of the date and -timezone, named DateTime and DateTimeZone respectively. You can see the methods -and constants available to the new classes by running - -php --rc DateTime -php --rc DateTimeZone - -under PHP CLI - or see the PHP Manual under Date/Time functions, or the 'NEW -FEATURES' section below. All methods map to existing procedural date functions. - -================================== -Items from the NEWS file explained -================================== - -- Added new error mode E_RECOVERABLE_ERROR. (Derick, Marcus, Tony) - - Some of the existing E_ERROR conditions have been converted to something that - you can catch with a user-defined error handler. If an E_RECOVERABLE_ERROR is - not handled, it will behave in the same way as E_ERROR behaves in all versions - of PHP. Errors of this type are logged as 'Catchable fatal error'. - - -- Changed E_ALL error reporting mode to include E_RECOVERABLE_ERROR. (Marcus) - - This change means that the value of the E_ALL error_reporting constant is now - 6143, where the previous value was 2047. If you are setting the error_reporting - mode from either the Apache config file or the .htaccess files, you will need - to adjust the value accordingly. The same applies if you use the numeric value - rather than the constant in your PHP scripts. - - -- Added support for constructors in interfaces to force constructor signature - checks in implementations. (Marcus) - - Starting with PHP 5.2, interfaces can have constructors. However, if you choose - to declare a constructor in an interface, each class implementing that interface - MUST include a constructor with a signature matching that of the base interface - constructor. By 'signature' we mean the parameter and return type definitions, - including any type hints and including whether the data is passed by reference - or by value. - - -- Changed __toString to be called wherever applicable. (Marcus) - - The magic method __toString() will now be called in a string context, that - is, anywhere an object is used as a string. When implementing your __toString() - method in a class, you should be aware that the script will terminate if - your function throws an exception. - - The PHP 5.0/5.1 fallback - returning a string that contains the object - identifier - has been dropped in PHP 5.2. It became problematic because - an object identifier cannot be considered unique. This change will mean - that your application is flawed if you have relied on the object identifier - as a return value. An attempt to use that value as a string will now result - in a catchable fatal error (see above). - - Even with __toString(), objects cannot be used as array indices or keys. We - may add built-in hash support for this at a later date, but for PHP 5.2 you - will need to either provide your own hashing or use the new SPL function - spl_object_hash(). - - -- Added RFC2397 (data: stream) support. (Marcus) - - The introduction of the 'data' URL scheme has the potential to lead to a - change of behaviour under Windows. If you are working with an NTFS - file system and making use of meta streams in your application, and if you - just happen to be using a file with the name 'data:' that is accessed without - any path information - it won't work any more. The fix is to use the 'file:' - protocol when accessing it. - - There is information about the RFC at http://www.faqs.org/rfcs/rfc2397.html. - - -- Added allow_url_include ini directive to complement allow_url_fopen. (Rasmus) - - This useful option makes it possible to differentiate between standard - file operations on remote files, and the inclusion of remote files. While the - former is usually desirable, the latter can be a security risk if used naively. - Starting with PHP 5.2, you can allow remote file operations while - disallowing the inclusion of remote files in local scripts. In fact, this - is the default configuration. - - -- Dropped abstract static class functions. (Marcus) - - Due to an oversight, PHP 5.0 and 5.1 allowed abstract static functions in - classes. In PHP 5.2, only interfaces can have them. - - -- Removed extensions (Derick, Tony) - - The filepro and hwapi extensions have been moved to PECL and are no longer - part of the PHP distribution. The PECL package version of these extensions - will be created according to user demand. - - -- Added extensions (Rasmus, Derick, Pierre) - - The JSON extension implements the JavaScript Object Notation (JSON) - data interchange format. This extension is enabled by default. - - The Filter extension validates and filters data, and is designed for - use with insecure data such as user input. This extension is enabled - by default; the default mode RAW does not impact input data in any way. - - The Zip extension enables you to transparently read or write ZIP - compressed archives and the files inside them. - - Please refer to the NEW FEATURES section below or to the PHP Manual - for details. - - -- Improved memory manager and increased default memory limit (Dmitry) - - The new memory manager allocates less memory and works faster than the - previous incarnation. It allocates memory from the system in large blocks, - and then manages the heap by itself. The memory_limit value in php.ini is - checked, not for each emalloc() call (as before), but for actual blocks - requested from the system. This means that memory_limit is far more - accurate than it used to be, since the old memory manager didn't calculate - all the memory overhead used by the malloc library. - - Thanks to this new-found accuracy memory usage may appear to have increased, - although actually it has not. To accommodate this apparent increase, the - default memory_limit setting was also increased - from 8 to 16 megabytes. - - -- Changed priority of PHPRC environment variable on win32 (Dmitry) - - The PHPRC environment variable now takes priority over the path stored - in the Windows registry. - - -- CLI SAPI no longer checks cwd for php.ini or the php-cli.ini file (Edin) - - In PHP 5.1 an undocumented feature was added that made the CLI binary check - the current working directory for a PHP configuration file, potentially - leading to unpredictable behavior if an unexpected configuration file were - read. This functionality was removed in 5.2, and PHP will no longer search - CWD for the presence of php.ini or php-cli.ini files. - - -- Added a notice when performing modulus 0 operation (Tony) - - In earlier versions of PHP, performing integer % 0 did not emit any - warning messages, instead returning an unexpected return value of FALSE. - As of PHP 5.2 this operation will emit an E_WARNING, as is the case in all - other instances where division by zero is performed. - - -- As a side-effect of a change made to prevent duplicate error messages - when error_tracking is On [Ilia], it is now necessary to return FALSE - from your error handler in order to populate $php_errormsg. This allows - you to fine-grain the levels of the messages stored. - - -============================== -Backwards incompatible changes -============================== - -In the PHP core -=============== -getrusage() will return NULL when passed incompatible arguments -As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/standard/microtime.c?r1=1.57&r2=1.58 && ?r1=1.53.2.2&r2=1.53.2.2.2.1 - -In ext/zip -========== -ZipArchive::setCommentName() now returns TRUE on success -ZipArchive::setCommentIndex() now return TRUE on success -As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.15&r2=1.1.2.16 - -In ext/spl -========== -SplFileObject::getFilename() now returns the filename, not relative/path/to/file -As of 5.2.1 #See http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.10&r2=1.45.2.27.2.11 -================== -NEW ERROR MESSAGES -================== - -In the PHP core -=============== - - - -OO related in the PHP core -========================== - -bar; - } -} - -$foo = new foo; -$bar =& $foo->prop; -/* Notice: Indirect modification of overloaded property foo::$prop has no effect in filename on line n */ - - -class foo implements iterator { - public function current() { - - } - public function next() { - - } - public function key() { - - } - public function valid() { - - } - public function rewind() { - - } -} - -$foo = new foo(); -foreach($foo as &$ref) {} -/* Fatal error: An iterator cannot be used with foreach by reference in filename on line n */ - - -class foo { - private function __construct() { - } -} -class bar extends foo { - public function __construct() { - parent::__construct(); - /* Fatal error: Cannot call private foo::__construct() in filename on line n */ - } -} -new bar; - - -abstract class foo { - abstract static function bar(); - /* Strict Standards: Static function foo::bar() should not be abstract in filename on line n */ -} - - -stream_filter_register("", "class"); -/* Warning: stream_filter_register(): Filter name cannot be empty in filename on line n */ - -stream_filter_register("filter", ""); -/* Warning: stream_filter_register(): Class name cannot be empty in filename on line n */ - - -class foo { - public function __toString() { - throw new Exception; - } -} -try { - print new foo; - /* Fatal error: Method foo::__toString() must not throw an exception in filename on line n */ -} catch(Exception $e) {} - - -class foo {} -$foo = new foo; -print $foo; -/* Catchable fatal error: Object of class foo could not be converted to string in filename on line n */ - -?> - -In the bzip2 extension -====================== - - - -In the date extension -===================== - - - -In the dBase extension -====================== - - - -In the mcrypt extension -======================= - - - -In the oci8 extension -===================== - - - -In the SPL extension -==================== - -fgetcsv("foo"); -/* Warning: SplFileObject::fgetcsv(): delimiter must be a character in filename on line n */ - -$obj->fgetcsv(",", "foo"); -/* Warning: SplFileObject::fgetcsv(): enclosure must be a character in filename on line n */ - -?> - -In the sysvmsg extension -======================== - - -In the Zip extension -==================== -open("archive.zip"); -$obj->setCommentName("", "comment");' -/* Notice: ZipArchive::setCommentName(): Empty string as entry name in filename on line n */ - -$obj->getCommentName(""); -/* Notice: ZipArchive::getCommentName(): Empty string as entry name in filename on line n */ -As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.15&r2=1.1.2.16 -?> - - -============ -NEW FEATURES -============ - -New extensions -============== - - Filter - Methods: - mixed filter_has_var(constant type, string variable_name) - - Returns true if the variable with the name 'name' exists in source - int filter_id(string filtername) - - Returns the filter ID belonging to a named filter - mixed filter_input(constant type, string variable_name [, long filter [, mixed options]]) - - Returns the filtered variable 'name'* from source `type` - mixed filter_input_array(constant type, [, mixed options]]) - - Returns an array with all arguments defined in 'definition' - array filter_list() - - Returns a list of all supported filters - mixed filter_var(mixed variable [, long filter [, mixed options]]) - - Returns the filtered version of the variable. - mixed filter_var_array(array data, [, mixed options]]) - - Returns an array with all arguments defined in 'definition' - - JSON - Methods: - mixed json_decode(string json[, boolean assoc=0]) - - Decodes a JSON string into a PHP object/associative array - string json_encode(mixed parameter) - - Takes a object or an array and returns a JSON encoded string - - Zip - Class constants: - ZipArchive::CHECKCONS - ZipArchive::CM_DEFAULT - ZipArchive::CM_DEFLATE - ZipArchive::CM_DEFLATE64 - ZipArchive::CM_IMPLODE - ZipArchive::CM_PKWARE_IMPLODE - ZipArchive::CM_REDUCE_1 - ZipArchive::CM_REDUCE_2 - ZipArchive::CM_REDUCE_3 - ZipArchive::CM_REDUCE_4 - ZipArchive::CM_SHRINK - ZipArchive::CM_STORE - ZipArchive::CREATE - ZipArchive::ER_CHANGED - ZipArchive::ER_CLOSE - ZipArchive::ER_COMPNOTSUPP - ZipArchive::ER_CRC - ZipArchive::ER_DELETED - ZipArchive::ER_EOF - ZipArchive::ER_EXISTS - ZipArchive::ER_INCONS - ZipArchive::ER_INTERNAL - ZipArchive::ER_INVAL - ZipArchive::ER_MEMORY - ZipArchive::ER_MULTIDISK - ZipArchive::ER_NOENT - ZipArchive::ER_NOZIP - ZipArchive::ER_OK - ZipArchive::ER_OPEN - ZipArchive::ER_READ - ZipArchive::ER_REMOVE - ZipArchive::ER_RENAME - ZipArchive::ER_SEEK - ZipArchive::ER_TMPOPEN - ZipArchive::ER_WRITE - ZipArchive::ER_ZIPCLOSED - ZipArchive::ER_ZLIB - ZipArchive::EXCL - ZipArchive::FL_COMPRESSED - ZipArchive::FL_NOCASE - ZipArchive::FL_NODIR - ZipArchive::FL_UNCHANGED - ZipArchive::OVERWRITE - - Functions: - void zip_close(resource zip) - - Close a Zip archive - void zip_entry_close(resource zip_ent) - - Close a zip entry - int zip_entry_compressedsize(resource zip_entry) - - Return the compressed size of a Zip entry - string zip_entry_compressionmethod(resource zip_entry) - - Return a string containing the compression method used on a particular entry - int zip_entry_filesize(resource zip_entry) - - Return the actual filesize of a Zip entry - string zip_entry_name(resource zip_entry) - - Return the name given a Zip entry - bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode]) - - Open a Zip File, pointed by the resource entry - mixed zip_entry_read(resource zip_entry [, int len]) - - Read from an open directory entry - resource zip_open(string filename) - - Create new zip using source URI for output - resource zip_read(resource zip) - - Returns the next file in the archive - Methods: - bool ZipArchive::addFile(string filepath[, string entryname[, int start [, int length]]]) - - Add a file in a Zip archive using its path and the name to use - bool ZipArchive::addFromString(string name, string content) - - Add a file using content and the entry name - void ZipArchive::close() - - close the zip archive - bool ZipArchive::deleteIndex(int index) - - Delete a file using its index - bool ZipArchive::deleteName(string name) - - Delete a file using its index - bool ZipArchive::extractTo(string pathto[, mixed files]) - - Extract one or more file from a zip archive to a specified destination - string ZipArchive::getArchiveComment() - - Returns the Zip archive comment - string ZipArchive::getCommentIndex(int index) - - Returns the comment of an entry using its index - string ZipArchive::getCommentName(string name) - - Returns the comment of an entry using its name - string ZipArchive::getFromName(string entryname[, int len [, int flags]]) - - get the contents of an entry using its name - string ZipArchive::getFromIndex(string entryname[, int len [, int flags]]) - - get the contents of an entry using its index - string ZipArchive::getNameIndex(int index [, int flags]) - - Returns the name of the file at position index - resource ZipArchive::getStream(string entryname) - - Get a stream for an entry using its name - int ZipArchive::locateName(string filename[, int flags]) - - Returns the index of the entry named filename in the archive - mixed ZipArchive::open(string source [, int flags]) - - Create new zip using source URI for output, return TRUE on success or the error code - bool ZipArchive::renameIndex(int index, string new_name) - - Rename an entry selected by its index to new_name - bool ZipArchive::renameName(string name, string new_name) - - Rename an entry selected by its name to new_name - bool ZipArchive::setArchiveComment(string name, string comment) - - Set or remove (NULL/'') the comment of the archive - bool ZipArchive::setCommentIndex(int index, string comment) - - Set or remove (NULL/'') the comment of an entry using its index - bool ZipArchive::setCommentName(string name, string comment) - - Set or remove (NULL/'') the comment of an entry using its Name - array ZipArchive::statIndex(int index[, int flags]) - - Returns the zip entry information using its index - array ZipArchive::statName(string filename[, int flags]) - - Returns the information about a the zip entry filename - bool ZipArchive::unchangeAll() - - All changes made to the archive are reverted - bool ZipArchive::unchangeArchive() - - Revert all global changes to the archive. For now, this only reverts archive comment changes - bool ZipArchive::unchangeIndex(int index) - - Changes to the file at position index are reverted - bool ZipArchive::unchangeName(string name) - - Changes to the file named 'name' are reverted - - -New classes -=========== - - DateTime: - Constants: - DateTime::ATOM - DateTime::COOKIE - DateTime::ISO8601 - DateTime::RFC822 - DateTime::RFC850 - DateTime::RFC1036 - DateTime::RFC1123 - DateTime::RFC2822 - DateTime::RFC3339 - DateTime::RSS - DateTime::W3C - Methods: - DateTime::__construct([string time[, DateTimeZone object]]) - - Returns new DateTime object - string DateTime::format(string format) - - Returns date formatted according to given format - long DateTime::getOffset() - - Returns the DST offset - DateTimeZone DateTime::getTimezone() - - Return new DateTimeZone object relative to give DateTime - void DateTime::modify(string modify) - - Alters the timestamp - array DateTime::parse(string date) - - Returns associative array with detailed info about given date - void DateTime::setDate(long year, long month, long day) - - Sets the date - void DateTime::setISODate(long year, long week[, long day]) - - Sets the ISO date - void DateTime::setTime(long hour, long minute[, long second]) - - Sets the time - void DateTime::setTimezone(DateTimeZone object) - - Sets the timezone for the DateTime object - - DateTimeZone: - Methods: - DateTimeZone DateTimeZone::__construct(string timezone) - - Returns new DateTimeZone object - string DateTimeZone::getName() - - Returns the name of the timezone - long DateTimeZone::getOffset(DateTime object) - - Returns the timezone offset - array DateTimeZone::getTransitions() - - Returns numerically indexed array containing associative array for all transitions for the timezone - - RecursiveRegexIterator: - extends RegexIterator - implements OuterIterator, Traversable, Iterator, RecursiveIterator - Methods: - RecursiveRegexIterator::__construct(RecursiveIterator it, string regex [, int mode [, int flags [, int preg_flags]]]) - Create an RecursiveRegexIterator from another recursive iterator and a regular expression - RecursiveRegexIterator RecursiveRegexIterator::getChildren() - Return the inner iterator's children contained in a RecursiveRegexIterator - bool RecursiveRegexIterator::hasChildren() - Check whether the inner iterator's current element has children - - RegexIterator: - extends FilterIterator - implements Iterator, Traversable, OuterIterator - Constants: - RecursiveRegexIterator::ALL_MATCHES - RecursiveRegexIterator::GET_MATCH - RecursiveRegexIterator::MATCH - RecursiveRegexIterator::REPLACE - RecursiveRegexIterator::SPLIT - RecursiveRegexIterator::USE_KEY - Properties: - public $replacement - Methods: - RegexIterator::__construct(Iterator it, string regex [, int mode [, int flags [, int preg_flags]]]) - - Create an RegexIterator from another iterator and a regular expression - bool RegexIterator::accept() - - Match (string)current() against regular expression - bool RegexIterator::getFlags() - - Returns current operation flags - bool RegexIterator::getMode() - - Returns current operation mode - bool RegexIterator::getPregFlags() - - Returns current PREG flags (if in use or NULL) - bool RegexIterator::setFlags(int new_flags) - - Set operation flags - bool RegexIterator::setMode(int new_mode) - - Set new operation mode - bool RegexIterator::setPregFlags(int new_flags) - - Set PREG flags - - -New methods -=========== - -In ext/dom -========== - DOMDocument: - DOMDocument::registerNodeClass(string baseclass, string extendedclass) - - Register extended class used to create base node type - - DOMElement: - DOMElement::setIDAttribute(string name, boolean isId) - - Declares the attribute specified by name to be of type ID - DOMElement::setIDAttributeNode(DOMAttr idAttr, boolean isId) - - Declares the attribute specified by node to be of type ID - DOMElement::setIDAttributeNS(string namespaceURI, string localName, boolean isId) - - Declares the attribute specified by local name and namespace URI to be of type ID - - DOMNode: - DOMNode::C14N([bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]]) - - Canonicalize nodes to a string - DOMNode::C14NFile(string uri [, bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]]) - - Canonicalize nodes to a file - DOMNode::getNodePath() - - Gets an xpath for a node - -In ext/soap -=========== - SoapServer: - SoapServer::setObject(object obj) - - Sets object which will handle SOAP requests - -In ext/spl -========== - ArrayObject: - int ArrayObject::asort(void) - - Sort the entries by values - int ArrayObject::ksort(void) - - Sort the entries by key - int ArrayObject::natcasesort(void) - - Sort the entries by key using case insensitive "natural order" algorithm. - int ArrayObject::natsort(void) - - Sort the entries by values using "natural order" algorithm. - int ArrayObject::uasort(callback cmp_function) - - Sort the entries by values user defined function - int ArrayObject::uksort(callback cmp_function) - - Sort the entries by key using user defined function. - - AppendIterator: - ArrayIterator AppendIterator::getArrayIterator() - Get access to inner ArrayIterator - int AppendIterator::getIteratorIndex() - Get index of iterator - - CachingIterator: - bool CachingIterator::getCache() - Return the cache - int CachingIterator::getFlags() - Return the internal flags - bool CachingIterator::offsetExists(mixed index) - Return whether the requested index exists - string CachingIterator::offsetGet(mixed index) - - Return the internal cache if used - void CachingIterator::offsetSet(mixed index, mixed newval) - - Set given index in cache - void CachingIterator::offsetUnset(mixed index) - - Unset given index in cache - void CachingIterator::setFlags() - Set the internal flags - - SplFileObject: - array("delimiter" =>, "enclosure" =>) SplFileObject::getCsvControl(void) - - Get the delimiter and enclosure character used in fgetcsv - void SplFileObject::setCsvControl([string delimiter = ',' [, string enclosure = '"']]) - - Set the delimiter and enclosure character used in fgetcsv - - XMLReader: - boolean XMLReader::setSchema(string filename) - Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read() - -In ext/zip -========== - ZipArchive: - bool addEmptyDir(string dirname) - Creates an empty directory in the archive -As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.15&r2=1.1.2.16 - -New class constants -=================== - -In ext/pdo -========== - PDO::ATTR_DEFAULT_FETCH_MODE - PDO::FETCH_PROPS_LATE - -In ext/spl -========== - CachingIterator::FULL_CACHE - CachingIterator::TOSTRING_USE_INNER - - SplFileObject::READ_AHEAD - SplFileObject::READ_CSV - SplFileObject::SKIP_EMPTY - - -New functions -============= - -In the PHP core -=============== - array array_fill_keys(array keys, mixed val) - - Create an array using the elements of the first parameter as keys, each initialized to val - array error_get_last() - - Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet - string image_type_to_extension(int imagetype [, bool include_dot]) - - Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype - int memory_get_peak_usage([real_usage]) - - Returns the peak allocated by PHP memory - array timezone_abbreviations_list() - - Returns associative array containing DST, offset and the timezone name - array timezone_identifiers_list() - - Returns numerically indexed array with all timezone identifiers - string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]]) - - Returns the timezone name from abbreviation -As of 5.2.1: #See http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.9&r2=1.58.2.6.2.10&diff_format=u - int stream_socket_shutdown(resource stream, int how) - - Causes all or part of a full-duplex connection on the socket associated with stream to be shut down - -In ext/mbstring -=============== - array mb_list_encodings_alias_names([string encoding]) - - Returns an array of all supported entity encodings - mixed mb_list_mime_names([string encoding]) - - Returns an array or string of all supported mime names - int mb_stripos(string haystack, string needle [, int offset [, string encoding]]) - - Finds position of first occurrence of a string within another, case insensitive - string mb_stristr(string haystack, string needle[, bool part[, string encoding]]) - - Finds first occurrence of a string within another, case insensitive - string mb_strrchr(string haystack, string needle[, bool part[, string encoding]]) - - Finds the last occurrence of a character in a string within another - string mb_strrichr(string haystack, string needle[, bool part[, string encoding]]) - - Finds the last occurrence of a character in a string within another, case insensitive - int mb_strripos(string haystack, string needle [, int offset [, string encoding]]) - - Finds position of last occurrence of a string within another, case insensitive - string mb_strstr(string haystack, string needle[, bool part[, string encoding]]) - - Finds first occurrence of a string within another - -In ext/ming -=========== -As of 5.2.1: See http://cvs.php.net/viewvc.cgi/php-src/ext/ming/ming.c?r1=1.79.2.4.2.4&r2=1.79.2.4.2.5&diff_format=u - void ming_setSWFCompression(int num) - - Sets output compression - void swfmovie::namedanchor(string name) - - Creates anchor - void swfmovie::protect([string pasword]) - - Protects - -In ext/openssl -============== - resource openssl_csr_get_public_key(mixed csr) - - Extracts public key from a CERT and prepares it for use - array openssl_csr_get_subject(mixed csr [, bool use_short_names]) - - Returns the subject of a CERT - array openssl_pkey_get_details(resource key) - - returns an array with the key details (bits, pkey, type) - -In ext/spl -========== - string spl_object_hash(object obj) - - Return hash id for given object - int iterator_apply(Traversable it, mixed function [, mixed params]) - - Calls a function for every element in an iterator - -In ext/pcre -=========== - int preg_last_error(void) - - Returns the error code of the last regex execution - -In ext/pgsql -============ - mixed pg_field_table(resource result, int field_number[, bool oid_only]) - - Returns the name of the table field belongs to, or table's oid if oid_only is true - -In ext/posix -============ - bool posix_initgroups(string name, int base_group_id) - - Calculate the group access list for the user specified in name - -In ext/gmp -========== - resource gmp_nextprime(resource a) - - Finds next prime of a - -In ext/xmlwriter -================ - bool xmlwriter_full_end_element(resource xmlwriter) - - End current element - returns FALSE on error - bool xmlwriter_write_raw(resource xmlwriter, string content) - - Write text - returns FALSE on error -As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/php_xmlwriter.c?r1=1.20.2.12.2.8&r2=1.20.2.12.2.9 - bool xmlwriter_start_dtd_entity(resource xmlwriter, string name, bool isparam) - - Create start DTD Entity - returns FALSE on error - bool xmlwriter_end_dtd_entity(resource xmlwriter) - - End current DTD Entity - returns FALSE on error - bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content [, bool pe [, string pubid [, string sysid [, string ndataid]]]]) - - Write full DTD Entity tag - returns FALSE on error - - -New optional parameters -======================= - -In the PHP core -=============== - - string base64_decode(string str[, bool strict=false]) (strict) - - bool setcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly=false]]]]]] (httponly) - - bool setrawcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly=false]]]]]] (httponly) - - void session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure[, bool httponly]]]]) (httponly) - - int memory_get_usage([bool real_usage=false]) (real_usage) - -In ext/curl -=========== - - array curl_multi_info_read(resource mh [, long msgs_in_queue]) (msgs_in_queue) - -In ext/imap -=========== - - resource imap_open ( string mailbox, string username, string password [, int options[, int n_retries]]) (n_retries) - - bool imap_reopen(resource stream_id, string mailbox [, int options [, int n_retries]]) (n_retries) -As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.7&r2=1.208.2.7.2.8 - -In ext/mbstring -=============== - - int mb_strrpos(string haystack, string needle [, int offset [, string encoding]]) (offset) - -In ext/ming -=========== - - int swfmovie::streamMP3(mixed file [, float skip]) (skip) -As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/ming/ming.c?r1=1.79.2.4.2.3&r2=1.79.2.4.2.4 - -In ext/openssl -============== - - int openssl_verify(string data, string signature, mixed key [, int signature_algo]) (signature_algo) - -In ext/pgsql -============ - - string pg_escape_bytea([resource connection,] string data) (connection) - - string pg_escape_string([resource connection,] string data) (connection) - -In ext/simplexml -================ - - SimpleXMLElement::__construct(string data [, int options [, bool data_is_url [, string ns [, bool is_prefix]]]]) (ns, is_prefix) - - SimpleXMLElement SimpleXMLElement::attributes([string ns [, bool is_prefix]]) (is_prefix) - - SimpleXMLElement SimpleXMLElement::children([string ns [, bool is_prefix]]) (is_prefix) - - SimpleXMLElement simplexml_load_file(string filename [, string class_name [, int options [, string ns [, bool is_prefix]]]]) (ns, is_prefix) - - SimpleXMLElement simplexml_load_string(string data [, string class_name [, int options [, string ns [, bool is_prefix]]]]) (ns, is_prefix) - -In ext/spl -========== - - array iterator_to_array(Traversable it [, bool use_keys = true]) (use_keys) -As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.20&r2=1.73.2.30.2.21 - -In ext/xmlreader -================ - - boolean XMLReader::open(string URI [, string encoding [, int options]]) (encoding, options) - - boolean XMLReader::XML(string source [, string encoding [, int options]]) (encoding, options) - - -New INI settings -================ -allow_url_include PHP_INI_SYSTEM, default: false -pcre.backtrack_limit PHP_INI_ALL, default: 100000 -pcre.recursion_limit PHP_INI_ALL, default: 100000 -session.cookie_httponly PHP_INI_ALL, default: false - - -New global constants -==================== - -In the PHP core -=============== - - M_EULER - - M_LNPI - - M_SQRT3 - - M_SQRTPI - - PATHINFO_FILENAME - - PREG_BACKTRACK_LIMIT_ERROR - - PREG_BAD_UTF8_ERROR - - PREG_INTERNAL_ERROR - - PREG_NO_ERROR - - PREG_RECURSION_LIMIT_ERROR - - UPLOAD_ERR_EXTENSION -As of 5.2.1: (See http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.13&r2=1.409.2.6.2.14&diff_format=u) - - STREAM_SHUT_RD - - STREAM_SHUT_WR - - STREAM_SHUT_RDWR - -In ext/curl -=========== - - CURLE_FILESIZE_EXCEEDED - - CURLE_FTP_SSL_FAILED - - CURLE_LDAP_INVALID_URL - - CURLFTPAUTH_DEFAULT - - CURLFTPAUTH_SSL - - CURLFTPAUTH_TLS - - CURLFTPSSL_ALL - - CURLFTPSSL_CONTROL - - CURLFTPSSL_NONE - - CURLFTPSSL_TRY - - CURLOPT_FTP_SSL - - CURLOPT_FTPSSLAUTH - -In ext/ming -=========== -As of 5.2.1: See http://cvs.php.net/viewvc.cgi/php-src/ext/ming/ming.c?r1=1.79.2.4.2.4&r2=1.79.2.4.2.5&diff_format=u - - SWFTEXTFIELD_USEFONT - - SWFTEXTFIELD_AUTOSIZE - - SWF_SOUND_NOT_COMPRESSED - - SWF_SOUND_ADPCM_COMPRESSED - - SWF_SOUND_MP3_COMPRESSED - - SWF_SOUND_NOT_COMPRESSED_LE - - SWF_SOUND_NELLY_COMPRESSED - - SWF_SOUND_5KHZ - - SWF_SOUND_11KHZ - - SWF_SOUND_22KHZ - - SWF_SOUND_44KHZ - - SWF_SOUND_8BITS - - SWF_SOUND_16BITS - - SWF_SOUND_MONO - - SWF_SOUND_STEREO - -In ext/openssl -============== - - OPENSSL_VERSION_NUMBER - - OPENSSL_VERSION_TEXT - -In ext/snmp -=========== - - SNMP_OID_OUTPUT_FULL - - SNMP_OID_OUTPUT_NUMERIC - -In ext/sysvmsg -============== - - MSG_EAGAIN - - MSG_ENOMSG diff --git a/README.namespaces b/README.namespaces index 310adcc88..9c427b634 100755 --- a/README.namespaces +++ b/README.namespaces @@ -10,7 +10,7 @@ Namespaces are defined the following way: Zend/DB/Connection.php: Namespace or class name can be imported: The use statement only defines name aliasing. It may create name alias for -namespace or class. The simple form of statement "use A::B::C::D;" is -equivalent to "use A::B::C::D as D;". The use statement can be used at any +namespace or class. The simple form of statement "use A\B\C\D;" is +equivalent to "use A\B\C\D as D;". The use statement can be used at any time in the global scope (not inside function/class) and takes effect from the point of definition down to the end of file. It is recommended however to place the use statements at the beginning of the file. The use statements have effect only on the file where they appear. -The special "empty" namespace (:: prefix) is useful as explicit global -namespace qualification. All class and function names started from :: +The special "empty" namespace (\ prefix) is useful as explicit global +namespace qualification. All class and function names started from \ interpreted as global. A special constant __NAMESPACE__ contains the name of the current namespace. It can be used to construct fully-qualified names to pass them as callbacks. In global namespace __NAMESPACE__ constant has the value of empty string. @@ -83,32 +83,32 @@ In global namespace __NAMESPACE__ constant has the value of empty string. Names inside namespace are resolved according to the following rules: 1) all qualified names are translated during compilation according to -current import rules. So if we have "use A::B::C" and then "C::D::e()" -it is translated to "A::B::C::D::e()". +current import rules. So if we have "use A\B\C" and then "C\D\e()" +it is translated to "A\B\C\D\e()". 2) unqualified class names translated during compilation according to -current import rules. So if we have "use A::B::C" and then "new C()" it -is translated to "new A::B::C()". +current import rules. So if we have "use A\B\C" and then "new C()" it +is translated to "new A\B\C()". 3) inside namespace, calls to unqualified functions that are defined in current namespace (and are known at the time the call is parsed) are interpreted as calls to these namespace functions. 4) inside namespace, calls to unqualified functions that are not defined in current namespace are resolved at run-time. The call to function foo() -inside namespace (A::B) first tries to find and call function from current -namespace A::B::foo() and if it doesn't exist PHP tries to call internal +inside namespace (A\B) first tries to find and call function from current +namespace A\B\foo() and if it doesn't exist PHP tries to call internal function foo(). Note that using foo() inside namespace you can call only -internal PHP functions, however using ::foo() you are able to call any +internal PHP functions, however using \foo() you are able to call any function from the global namespace. 5) unqualified class names are resolved at run-time. E.q. "new Exception()" first tries to use (and autoload) class from current namespace and in case of failure uses internal PHP class. Note that using "new A" in namespace you can only create class from this namespace or internal PHP class, however -using "new ::A" you are able to create any class from the global namespace. +using "new \A" you are able to create any class from the global namespace. 6) Calls to qualified functions are resolved at run-time. Call to -A::B::foo() first tries to call function foo() from namespace A::B, then -it tries to find class A::B (__autoload() it if necessary) and call its +A\B\foo() first tries to call function foo() from namespace A\B, then +it tries to find class A\B (__autoload() it if necessary) and call its static method foo() 7) qualified class names are interpreted as class from corresponding -namespace. So "new A::B::C()" refers to class C from namespace A::B. +namespace. So "new A\B\C()" refers to class C from namespace A\B. Examples -------- @@ -116,38 +116,38 @@ Examples namespace A; foo(); // first tries to call "foo" defined in namespace "A" // then calls internal function "foo" -::foo(); // calls function "foo" defined in global scope +\foo(); // calls function "foo" defined in global scope ?> The worst case if class name conflicts with namespace name diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 6a13f0391..964f2de3b 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.35.2.17 2009/01/21 19:07:35 dmitry Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.35.2.21 2009/06/16 21:54:12 pajoye Exp $ */ #include #include @@ -35,6 +35,9 @@ #ifdef TSRM_WIN32 #include #include "tsrm_win32.h" +# ifndef IO_REPARSE_TAG_SYMLINK +# define IO_REPARSE_TAG_SYMLINK 0xA000000C +# endif #endif #ifdef NETWARE @@ -137,6 +140,42 @@ static int php_check_dots(const char *element, int n) #ifdef TSRM_WIN32 +#ifdef CTL_CODE +#undef CTL_CODE +#endif +#define CTL_CODE(DeviceType,Function,Method,Access) (((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method)) +#define FILE_DEVICE_FILE_SYSTEM 0x00000009 +#define METHOD_BUFFERED 0 +#define FILE_ANY_ACCESS 0 +#define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 ) + +typedef struct { + unsigned long ReparseTag; + unsigned short ReparseDataLength; + unsigned short Reserved; + union { + struct { + unsigned short SubstituteNameOffset; + unsigned short SubstituteNameLength; + unsigned short PrintNameOffset; + unsigned short PrintNameLength; + unsigned long Flags; + wchar_t ReparseTarget[1]; + } SymbolicLinkReparseBuffer; + struct { + unsigned short SubstituteNameOffset; + unsigned short SubstituteNameLength; + unsigned short PrintNameOffset; + unsigned short PrintNameLength; + wchar_t ReparseTarget[1]; + } MountPointReparseBuffer; + struct { + unsigned char ReparseTarget[1]; + } GenericReparseBuffer; + }; +} REPARSE_DATA_BUFFER; + #define SECS_BETWEEN_EPOCHS (__int64)11644473600 #define SECS_TO_100NS (__int64)10000000 static inline time_t FileTimeToUnixTime(const FILETIME FileTime) @@ -471,6 +510,12 @@ static inline void realpath_cache_add(const char *path, int path_len, const char } bucket->realpath_len = realpath_len; bucket->is_dir = is_dir; +#ifdef PHP_WIN32 + bucket->is_rvalid = 0; + bucket->is_readable = 0; + bucket->is_wvalid = 0; + bucket->is_writable = 0; +#endif bucket->expires = t + CWDG(realpath_cache_ttl); n = bucket->key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0])); bucket->next = CWDG(realpath_cache)[n]; @@ -503,6 +548,12 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p } /* }}} */ +CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC) /* {{{ */ +{ + return realpath_cache_find(path, path_len, t TSRMLS_CC); +} +/* }}} */ + #undef LINK_MAX #define LINK_MAX 32 @@ -518,7 +569,8 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i #endif realpath_cache_bucket *bucket; char *tmp; - TSRM_ALLOCA_FLAG(use_heap); + TSRM_ALLOCA_FLAG(use_heap) + TSRM_ALLOCA_FLAG(use_heap_large) while (1) { if (len <= start) { @@ -594,7 +646,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i memcpy(path, bucket->realpath, bucket->realpath_len + 1); return bucket->realpath_len; } - } + } } #ifdef TSRM_WIN32 @@ -606,16 +658,103 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i /* continue resolution anyway but don't save result in the cache */ save = 0; } + if (save) { - directory = (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; - if (is_dir && !directory) { - /* not a directory */ - FindClose(hFind); - return -1; - } + FindClose(hFind); } + tmp = tsrm_do_alloca(len+1, use_heap); memcpy(tmp, path, len+1); + + if(save && (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) { + /* File is a reparse point. Get the target */ + HANDLE hLink = NULL; + REPARSE_DATA_BUFFER * pbuffer; + unsigned int retlength = 0, rname_off = 0; + int bufindex = 0, rname_len = 0, isabsolute = 0; + wchar_t * reparsetarget; + + if(++(*ll) > LINK_MAX) { + return -1; + } + + hLink = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL); + if(hLink == INVALID_HANDLE_VALUE) { + return -1; + } + + pbuffer = (REPARSE_DATA_BUFFER *)tsrm_do_alloca(MAXIMUM_REPARSE_DATA_BUFFER_SIZE, use_heap_large); + if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &retlength, NULL)) { + tsrm_free_alloca(pbuffer, use_heap_large); + CloseHandle(hLink); + return -1; + } + + CloseHandle(hLink); + + if(pbuffer->ReparseTag == IO_REPARSE_TAG_SYMLINK) { + rname_len = pbuffer->SymbolicLinkReparseBuffer.PrintNameLength/2; + rname_off = pbuffer->SymbolicLinkReparseBuffer.PrintNameOffset/2; + reparsetarget = pbuffer->SymbolicLinkReparseBuffer.ReparseTarget; + isabsolute = (pbuffer->SymbolicLinkReparseBuffer.Flags == 0) ? 1 : 0; + } + else if(pbuffer->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) { + rname_len = pbuffer->MountPointReparseBuffer.PrintNameLength/2; + rname_off = pbuffer->MountPointReparseBuffer.PrintNameOffset/2; + reparsetarget = pbuffer->MountPointReparseBuffer.ReparseTarget; + isabsolute = 1; + } + else { + tsrm_free_alloca(pbuffer, use_heap_large); + return -1; + } + + /* Convert wide string to narrow string */ + for(bufindex = 0; bufindex < rname_len; bufindex++) { + *(path + bufindex) = (char)(reparsetarget[rname_off + bufindex]); + } + + *(path + bufindex) = 0; + tsrm_free_alloca(pbuffer, use_heap_large); + j = bufindex; + + if(isabsolute == 1) { + /* use_realpath is 0 in the call below coz path is absolute*/ + j = tsrm_realpath_r(path, 0, j, ll, t, 0, is_dir, &directory TSRMLS_CC); + if(j < 0) { + tsrm_free_alloca(tmp, use_heap); + return -1; + } + } + else { + if(i + j >= MAXPATHLEN - 1) { + tsrm_free_alloca(tmp, use_heap); + return -1; + } + + memmove(path+i, path, j+1); + memcpy(path, tmp, i-1); + path[i-1] = DEFAULT_SLASH; + j = tsrm_realpath_r(path, start, i + j, ll, t, use_realpath, is_dir, &directory TSRMLS_CC); + if(j < 0) { + tsrm_free_alloca(tmp, use_heap); + return -1; + } + } + + if(link_is_dir) { + *link_is_dir = directory; + } + } + else { + if (save) { + directory = (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; + if (is_dir && !directory) { + /* not a directory */ + return -1; + } + } + #elif defined(NETWARE) save = 0; tmp = tsrm_do_alloca(len+1, use_heap); @@ -687,19 +826,18 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i #ifdef TSRM_WIN32 if (j < 0 || j + len - i >= MAXPATHLEN-1) { tsrm_free_alloca(tmp, use_heap); - if (save) FindClose(hFind); return -1; } if (save) { i = strlen(data.cFileName); memcpy(path+j, data.cFileName, i+1); j += i; - FindClose(hFind); } else { /* use the original file or directory name as it wasn't found */ memcpy(path+j, tmp+i, len-i+1); j += (len-i); } + } #else if (j < 0 || j + len - i >= MAXPATHLEN-1) { tsrm_free_alloca(tmp, use_heap); @@ -1060,7 +1198,6 @@ static void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* {{{ */ static int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */ { FILETIME mtime, atime; - BOOL f; HANDLE hFile; hFile = CreateFile(filename, GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index de65e87ad..65225f37b 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.8.2.6 2008/12/31 11:15:31 sebastian Exp $ */ +/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.8.2.7 2009/06/16 00:07:04 pajoye Exp $ */ #ifndef VIRTUAL_CWD_H #define VIRTUAL_CWD_H @@ -210,6 +210,12 @@ typedef struct _realpath_cache_bucket { int realpath_len; int is_dir; time_t expires; +#ifdef PHP_WIN32 + unsigned char is_rvalid; + unsigned char is_readable; + unsigned char is_wvalid; + unsigned char is_writable; +#endif struct _realpath_cache_bucket *next; } realpath_cache_bucket; @@ -231,6 +237,7 @@ extern virtual_cwd_globals cwd_globals; CWD_API void realpath_cache_clean(TSRMLS_D); CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC); +CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC); /* The actual macros to be used in programs using TSRM * If the program defines VIRTUAL_DIR it will use the diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 9a5299211..7c47fa336 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -16,21 +16,23 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_win32.c,v 1.27.2.1.2.7.2.3 2008/12/31 11:15:31 sebastian Exp $ */ +/* $Id: tsrm_win32.c,v 1.27.2.1.2.7.2.11 2009/06/16 00:07:04 pajoye Exp $ */ #include #include #include #include #include +#include #define TSRM_INCLUDE_FULL_WINDOWS_HEADERS - +#include "SAPI.h" #include "TSRM.h" #ifdef TSRM_WIN32 #include "tsrm_win32.h" +#include "tsrm_virtual_cwd.h" #ifdef ZTS static ts_rsrc_id win32_globals_id; @@ -40,11 +42,25 @@ static tsrm_win32_globals win32_globals; static void tsrm_win32_ctor(tsrm_win32_globals *globals TSRMLS_DC) { + HANDLE process_token = NULL; + globals->process = NULL; globals->shm = NULL; globals->process_size = 0; globals->shm_size = 0; globals->comspec = _strdup((GetVersion()<0x80000000)?"cmd.exe":"command.com"); + globals->impersonation_token = NULL; + + /* Access check requires impersonation token. Create a duplicate token. */ + if(OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_QUERY, &process_token)) { + DuplicateToken(process_token, SecurityImpersonation, &globals->impersonation_token); + } + + /* impersonation_token will be closed when the process dies */ + if(process_token != NULL) { + CloseHandle(process_token); + process_token = NULL; + } } static void tsrm_win32_dtor(tsrm_win32_globals *globals TSRMLS_DC) @@ -66,6 +82,10 @@ static void tsrm_win32_dtor(tsrm_win32_globals *globals TSRMLS_DC) } free(globals->comspec); + + if(globals->impersonation_token) { + CloseHandle(globals->impersonation_token); + } } TSRM_API void tsrm_win32_startup(void) @@ -86,21 +106,127 @@ TSRM_API void tsrm_win32_shutdown(void) TSRM_API int tsrm_win32_access(const char *pathname, int mode) { + SECURITY_INFORMATION sec_info = OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION; + GENERIC_MAPPING gen_map = { FILE_GENERIC_READ, FILE_GENERIC_WRITE, FILE_GENERIC_EXECUTE, FILE_ALL_ACCESS }; + DWORD priv_set_length = sizeof(PRIVILEGE_SET); + + PRIVILEGE_SET privilege_set = {0}; + DWORD sec_desc_length = 0, desired_access = 0, granted_access = 0; + BYTE * psec_desc = NULL; + BOOL fAccess = FALSE; + HANDLE process_token = NULL; + + realpath_cache_bucket * bucket = NULL; + char * real_path = NULL; + time_t t; + + TSRMLS_FETCH(); + if (mode == 1 /*X_OK*/) { -#if 1 - /* This code is not supported by Windows 98, - * but we don't support it anymore */ DWORD type; + return GetBinaryType(pathname, &type) ? 0 : -1; + } else { + if(access(pathname, mode)) { + return errno; + } - return GetBinaryType(pathname, &type)?0:-1; -#else - SHFILEINFO sfi; + if(!IS_ABSOLUTE_PATH(pathname, strlen(pathname)+1)) { + real_path = (char *)malloc(MAX_PATH); + if(tsrm_realpath(pathname, real_path TSRMLS_CC) == NULL) { + goto Finished; + } + pathname = real_path; + } + + if (CWDG(realpath_cache_size_limit)) { + t = time(0); + bucket = realpath_cache_lookup(pathname, strlen(pathname), t TSRMLS_CC); + if(bucket == NULL && real_path == NULL) { + /* We used the pathname directly. Call tsrm_realpath */ + /* so that entry is created in realpath cache */ + real_path = (char *)malloc(MAX_PATH); + if(tsrm_realpath(pathname, real_path TSRMLS_CC) != NULL) { + pathname = real_path; + bucket = realpath_cache_lookup(pathname, strlen(pathname), t TSRMLS_CC); + } + } + } + + /* Do a full access check because access() will only check read-only attribute */ + if(mode == 0 || mode > 6) { + if(bucket != NULL && bucket->is_rvalid) { + fAccess = bucket->is_readable; + goto Finished; + } + desired_access = FILE_GENERIC_READ; + } else if(mode <= 2) { + if(bucket != NULL && bucket->is_wvalid) { + fAccess = bucket->is_writable; + goto Finished; + } + desired_access = FILE_GENERIC_WRITE; + } else if(mode <= 4) { + if(bucket != NULL && bucket->is_rvalid) { + fAccess = bucket->is_readable; + goto Finished; + } + desired_access = FILE_GENERIC_READ; + } else { // if(mode <= 6) + if(bucket != NULL && bucket->is_rvalid && bucket->is_wvalid) { + fAccess = bucket->is_readable & bucket->is_writable; + goto Finished; + } + desired_access = FILE_GENERIC_READ | FILE_GENERIC_WRITE; + } - return access(pathname, 0) == 0 && - SHGetFileInfo(pathname, 0, &sfi, sizeof(SHFILEINFO), SHGFI_EXETYPE) != 0 ? 0 : -1; -#endif - } else { - return access(pathname, mode); + if(TWG(impersonation_token) == NULL) { + goto Finished; + } + + /* Get size of security buffer. Call is expected to fail */ + if(GetFileSecurity(pathname, sec_info, NULL, 0, &sec_desc_length)) { + goto Finished; + } + + psec_desc = (BYTE *)malloc(sec_desc_length); + if(psec_desc == NULL || + !GetFileSecurity(pathname, sec_info, (PSECURITY_DESCRIPTOR)psec_desc, sec_desc_length, &sec_desc_length)) { + goto Finished; + } + + if(!AccessCheck((PSECURITY_DESCRIPTOR)psec_desc, TWG(impersonation_token), desired_access, &gen_map, &privilege_set, &priv_set_length, &granted_access, &fAccess)) { + goto Finished; + } + + /* Keep the result in realpath_cache */ + if(bucket != NULL) { + if(desired_access == FILE_GENERIC_READ) { + bucket->is_rvalid = 1; + bucket->is_readable = fAccess; + } + else if(desired_access == FILE_GENERIC_WRITE) { + bucket->is_wvalid = 1; + bucket->is_writable = fAccess; + } + } + +Finished: + if(psec_desc != NULL) { + free(psec_desc); + psec_desc = NULL; + } + + if(real_path != NULL) { + free(real_path); + real_path = NULL; + } + + if(fAccess == FALSE) { + errno = EACCES; + return errno; + } else { + return 0; + } } } @@ -184,6 +310,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, PROCESS_INFORMATION process; SECURITY_ATTRIBUTES security; HANDLE in, out; + DWORD dwCreateFlags = 0; char *cmd; process_pair *proc; TSRMLS_FETCH(); @@ -206,7 +333,6 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, read = (type[0] == 'r') ? TRUE : FALSE; mode = ((str_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT; - if (read) { in = dupHandle(in, FALSE); startup.hStdInput = GetStdHandle(STD_INPUT_HANDLE); @@ -217,9 +343,14 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, startup.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); } + dwCreateFlags = NORMAL_PRIORITY_CLASS; + if (strcmp(sapi_module.name, "cli") != 0) { + dwCreateFlags |= CREATE_NO_WINDOW; + } + cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c ")+2); sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command); - if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, env, cwd, &startup, &process)) { + if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process)) { return NULL; } free(cmd); @@ -252,7 +383,7 @@ TSRM_API int pclose(FILE *stream) } fflush(process->stream); - fclose(process->stream); + fclose(process->stream); WaitForSingleObject(process->prochnd, INFINITE); GetExitCodeProcess(process->prochnd, &termstat); diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h index 8b3857caf..912fac653 100644 --- a/TSRM/tsrm_win32.h +++ b/TSRM/tsrm_win32.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_win32.h,v 1.19.2.1.2.1.2.2 2008/12/31 11:15:31 sebastian Exp $ */ +/* $Id: tsrm_win32.h,v 1.19.2.1.2.1.2.3 2009/05/17 19:42:53 pajoye Exp $ */ #ifndef TSRM_WIN32_H #define TSRM_WIN32_H @@ -63,6 +63,7 @@ typedef struct { int process_size; int shm_size; char *comspec; + HANDLE impersonation_token; } tsrm_win32_globals; #ifdef ZTS diff --git a/UPGRADING b/UPGRADING index f093b3216..26ca7f419 100755 --- a/UPGRADING +++ b/UPGRADING @@ -1,4 +1,4 @@ -$Id: UPGRADING,v 1.1.2.3.2.1.2.1 2009/01/28 17:23:28 sfox Exp $ +$Id: UPGRADING,v 1.1.2.3.2.1.2.10 2009/06/14 19:15:57 philip Exp $ UPGRADE NOTES - PHP 5.3 @@ -50,6 +50,8 @@ UPGRADE NOTES - PHP 5.3 - clearstatcache() no longer clears the realpath cache by default. +- call_user_func() now propagates $this even if the callee is the parent class. + - The filesystem functions opendir(), scandir() and dir() now use the default context if no context is passed as an argument to them. @@ -76,12 +78,18 @@ UPGRADE NOTES - PHP 5.3 copy(): context. fgetcsv(): escape. ini_get_all(): details. + json_encode(): options. nl2br(): is_xhtml. parse_ini_file(): scanner_mode. round(): mode. stream_context_create(): params. strstr(), stristr(): before_needle. +- The new mysqlnd library necessitates using MySQL's newer 41 byte password format. + Continued use of the old 16 byte passwords will cause mysql_connect() to produce + the following error message: "mysqlnd cannot connect to MySQL 4.1+ using old + authentication" + =================================== 3. Changes made to existing methods =================================== @@ -115,12 +123,21 @@ UPGRADE NOTES - PHP 5.3 5. Deprecated ============= -- Ticks: declare(ticks=N) and register_tick_function() both now trigger an - E_DEPRECATED notice. - - define_syslog_variables() is deprecated. -- All ereg functions are deprecated. Use PCRE (preg_*()) instead. +- All ereg functions are deprecated and emit E_DEPRECATED errors. + Use PCRE (preg_*()) instead. + +- The following ini directives will now emit an E_DEPRECATED warning + upon startup if they are activated: + + - define_syslog_variables + - register_globals + - register_long_arrays + - safe_mode + - magic_quotes_gpc + - magic_quotes_runtime + - magic_quotes_sybase =============== 6. Undeprecated @@ -186,7 +203,11 @@ UPGRADE NOTES - PHP 5.3 9. Changes in INI directives ============================ -- zend.ze1_compatibility_mode has been removed. +- zend_extension_debug and zend_extension_ts have been removed. + Instead use the zend_extension directive to load all Zend Extensions. + +- zend.ze1_compatibility_mode has been removed. If this ini directive is set + to on, then an E_ERROR is emitted at startup. - A new user initialization mechanism and config variables have been added: user_ini.filename and user_ini.cache_ttl @@ -227,17 +248,42 @@ UPGRADE NOTES - PHP 5.3 var_dump(0 ?: 'Hello!'); +- Namespaces were added: + + namespace my\name; + $obj = new \my\name\MyClass; + =================== 11. Windows support =================== -- The minimum Windows version is now Windows 2000. (Windows 98 and NT4 are no - longer supported). +- The minimum Windows version is now Windows 2000. (Windows 98, ME and NT4 are + no longer supported). - PHP Windows binaries target i586 or later. i386 and i486 are not supported. - Windows support has been added for the following functions: getopt(), - imagecolorclosesthwb(), mcrypt_create_iv(), inet_ntop() and inet_pton(). + imagecolorclosesthwb(), mcrypt_create_iv(), inet_ntop(), inet_pton(), + getmxrr(), checkdnsrr(), dns_get_record(), linkinfo(), readlink(), + symlink(), link(), fnmatch(), stream_socket_pair(), time_nanosleep(), + time_sleep_until() and socket_create_pair(). + +- Improved portability of stat(), touch(), filemtime(), filesize() and related + functions (100% portable for the available data) + +- The PDO_OCI php_pdo_oci8.dll library (for use with Oracle version 8 client + libraries) is no longer being built. Instead, use php_pdo_oci.dll (note no '8') + with Oracle 10 or 11 client libraries. Connection to other database versions + is supported. + +- For the OCI8 extension, a new library php_oci8_11g.dll is available in addition to + php_oci8.dll. Only one can be enabled at any time. Use php_oci8.dll with Oracle 10.2 + client libraries. Use php_oci8_11g.dll with Oracle 11 client libraries. Connection + to other database versions is supported. + +- It's now possible to use hardlinks on Windows using the link() function, + and symbolic links via the symlink() function. Hardlinks are available + as of Windows 2000 and symbolic links as of Windows Vista. =================== 12. New in PHP 5.3: @@ -282,6 +328,7 @@ UPGRADE NOTES - PHP 5.3 date_parse_from_format() date_create_from_format() date_get_last_errors() + timezone_version_get() - INI: parse_ini_string() - GMP: gmp_testbit() - Hash: hash_copy() @@ -290,6 +337,8 @@ UPGRADE NOTES - PHP 5.3 mysqli_get_connection_stats() mysqli_poll() mysqli_reap_async_query() + - Network: gethostname() + header_remove() - OpenSSL: openssl_random_pseudo_bytes() - PCNTL: pcntl_signal_dispatch() pcntl_sigprocmask() @@ -394,6 +443,12 @@ UPGRADE NOTES - PHP 5.3 DateTime::getLastErrors() - PDO_Firebird: PDO::setAttribute() - Reflection: ReflectionProperty::setAccessible() + ReflectionFunction::inNamespace() + ReflectionFunction::getNamespaceName() + ReflectionFunction::getShortName() + ReflectionClass::inNamespace() + ReflectionClass::getNamespaceName() + ReflectionClass::getShortName() - XSL: XSLTProcessor::setProfiling() h. New class constants diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index e6236790b..f63320469 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: Zend.m4,v 1.58.4.4.2.5 2008/12/02 16:19:09 cseiler Exp $ +dnl $Id: Zend.m4,v 1.58.4.4.2.6 2009/06/04 18:20:42 mattwil Exp $ dnl dnl This file contains Zend specific autoconf functions. dnl @@ -117,6 +117,38 @@ AC_CHECK_FUNCS(finite isfinite isinf isnan) ZEND_FP_EXCEPT ZEND_CHECK_FLOAT_PRECISION + +dnl test whether double cast to long preserves least significant bits +AC_MSG_CHECKING(whether double cast to long preserves least significant bits) + +AC_TRY_RUN([ +#include + +int main() +{ + if (sizeof(long) == 4) { + double d = (double) LONG_MIN * LONG_MIN + 2e9; + + if ((long) d == 2e9 && (long) -d == -2e9) { + exit(0); + } + } else if (sizeof(long) == 8) { + double correct = 18e18 - ((double) LONG_MIN * -2); /* Subtract ULONG_MAX + 1 */ + + if ((long) 18e18 == correct) { /* On 64-bit, only check between LONG_MAX and ULONG_MAX */ + exit(0); + } + } + exit(1); +} +], [ + AC_DEFINE([ZEND_DVAL_TO_LVAL_CAST_OK], 1, [Define if double cast to long preserves least significant bits]) + AC_MSG_RESULT(yes) +], [ + AC_MSG_RESULT(no) +], [ + AC_MSG_RESULT(no) +]) ]) diff --git a/Zend/tests/017.phpt b/Zend/tests/017.phpt index 09ad123c7..03c1e7317 100644 --- a/Zend/tests/017.phpt +++ b/Zend/tests/017.phpt @@ -60,7 +60,7 @@ int(%d) Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for get_defined_constants() in %s on line %d +Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line %d NULL string(5) "array" string(5) "array" diff --git a/Zend/tests/029.phpt b/Zend/tests/029.phpt index 469dd081b..8ef56fade 100644 --- a/Zend/tests/029.phpt +++ b/Zend/tests/029.phpt @@ -49,37 +49,3 @@ array(1) { } } } ---UEXPECT-- -array(1) { - [0]=> - object(stdClass)#1 (1) { - [u"a"]=> - object(stdClass)#2 (0) { - } - } -} -array(1) { - [0]=> - object(stdClass)#1 (2) { - [u"a"]=> - object(stdClass)#2 (0) { - } - [u"b"]=> - object(stdClass)#3 (0) { - } - } -} -array(1) { - [0]=> - object(stdClass)#1 (3) { - [u"a"]=> - object(stdClass)#2 (0) { - } - [u"b"]=> - object(stdClass)#3 (0) { - } - [u"c"]=> - object(stdClass)#2 (0) { - } - } -} diff --git a/Zend/tests/bug39018.phpt b/Zend/tests/bug39018.phpt index 1bc23d3ba..6de9092c9 100644 --- a/Zend/tests/bug39018.phpt +++ b/Zend/tests/bug39018.phpt @@ -65,7 +65,7 @@ print "\nDone\n"; Notice: Uninitialized string offset: 0 in %s on line 12 -Notice: Uninitialized string offset: -%d in %s on line 16 +Notice: Uninitialized string offset: %i in %s on line 16 Notice: Uninitialized string offset: 4 in %s on line 28 diff --git a/Zend/tests/bug42143.phpt b/Zend/tests/bug42143.phpt new file mode 100644 index 000000000..8a73d41bf --- /dev/null +++ b/Zend/tests/bug42143.phpt @@ -0,0 +1,38 @@ +--TEST-- +bug #42143 (The constant NAN is reported as 0 on Windows build) +--CREDITS-- +Venkat Raman Don +--FILE-- + +--EXPECT-- +Testing NAN: +NAN= float(NAN) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +float(NAN) +bool(false) +bool(false) +bool(false) +bool(true) +bool(true) +bool(false) + diff --git a/Zend/tests/bug43027.phpt b/Zend/tests/bug43027.phpt index 32f68d0bd..adecf3e39 100755 --- a/Zend/tests/bug43027.phpt +++ b/Zend/tests/bug43027.phpt @@ -7,5 +7,4 @@ namespace test; echo "ok\n"; ?> --EXPECTF-- -Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d ok diff --git a/Zend/tests/bug47516.phpt b/Zend/tests/bug47516.phpt new file mode 100644 index 000000000..66304fe3b --- /dev/null +++ b/Zend/tests/bug47516.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug #47516 (nowdoc can not be embed in heredoc but can be embed in double quote) +--FILE-- + +--EXPECT--- +abc +abc +abc diff --git a/Zend/tests/bug47596.phpt b/Zend/tests/bug47596.phpt new file mode 100644 index 000000000..1fcba21ec --- /dev/null +++ b/Zend/tests/bug47596.phpt @@ -0,0 +1,63 @@ +--TEST-- +Bug #47596 (Bus error on parsing file, when file size is equal to page size) +--FILE-- + +--EXPECT-- +ok diff --git a/Zend/tests/bug47699.phpt b/Zend/tests/bug47699.phpt new file mode 100644 index 000000000..23ea5a494 --- /dev/null +++ b/Zend/tests/bug47699.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #47699 (autoload and late static binding) +--FILE-- + +--EXPECTF-- +BB +Fatal error: Class 'X' not found in %sbug47699.php on line %d diff --git a/Zend/tests/bug47714.phpt b/Zend/tests/bug47714.phpt new file mode 100644 index 000000000..e8ef8c330 --- /dev/null +++ b/Zend/tests/bug47714.phpt @@ -0,0 +1,27 @@ +--TEST-- +Testing lambda function in set_exception_handler() +--FILE-- +getMessage()."\n"; + } + }'); +} + +function __autoload($class) { + au($class); +} + +//spl_autoload_register('au'); + +set_exception_handler(function($exception) { + $h = new handler(); + $h->handle($exception); +}); + +throw new Exception('exception'); +?> +--EXPECT-- +exception diff --git a/Zend/tests/bug47771.phpt b/Zend/tests/bug47771.phpt new file mode 100644 index 000000000..a17fcf3b5 --- /dev/null +++ b/Zend/tests/bug47771.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #47771 (Exception during object construction from arg call calls object's destructor) +--FILE-- +getMessage() . "\n"; +} +?> +--EXPECT-- +Exception: TEST_EXCEPTION diff --git a/Zend/tests/bug47801.phpt b/Zend/tests/bug47801.phpt new file mode 100644 index 000000000..323081926 --- /dev/null +++ b/Zend/tests/bug47801.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #47801 (__call() accessed via parent:: operator is provided incorrect method name) +--FILE-- +getFoo(); + +$b = new B(); +$b->getFoo(); + +?> +--EXPECT-- +magic method called: getFoo +magic method called: getFoo diff --git a/Zend/tests/bug47836.phpt b/Zend/tests/bug47836.phpt new file mode 100644 index 000000000..5a93a44c7 --- /dev/null +++ b/Zend/tests/bug47836.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #47836 (array operator [] inconsistency when the array has PHP_INT_MAX index value) +--FILE-- + +--EXPECTF-- +Warning: Cannot add element to the array as the next element is already occupied in %s on line 4 +array(1) { + [%d]=> + int(1) +} diff --git a/Zend/tests/bug47880.phpt b/Zend/tests/bug47880.phpt new file mode 100644 index 000000000..bf2022c80 --- /dev/null +++ b/Zend/tests/bug47880.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #47880 (crashes in call_user_func_array()) +--FILE-- + +--EXPECT-- +ok diff --git a/Zend/tests/bug47981.phpt b/Zend/tests/bug47981.phpt new file mode 100644 index 000000000..2d68d3706 --- /dev/null +++ b/Zend/tests/bug47981.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #47981 (error handler not called regardless) +--INI-- +error_reporting=0 +--FILE-- + +--EXPECTF-- +string(62) "Declaration of c::f() should be compatible with that of b::f()" + + diff --git a/Zend/tests/bug48004.phpt b/Zend/tests/bug48004.phpt new file mode 100644 index 000000000..596887652 --- /dev/null +++ b/Zend/tests/bug48004.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #48004 (Error handler prevents creation of default object) +--FILE-- +id = 1; + print_r($data); +} + +set_error_handler("error_handler"); +test(); +?> +--EXPECT-- +stdClass Object +( + [id] => 1 +) diff --git a/Zend/tests/bug48215.phpt b/Zend/tests/bug48215.phpt new file mode 100644 index 000000000..99c4dd289 --- /dev/null +++ b/Zend/tests/bug48215.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #48215 - parent::method() calls __construct +--FILE-- +A(); +?> +===DONE=== +--EXPECTF-- + +Strict Standards: Redefining already defined constructor for class A in %s on line %d +B::__construct +A::__construct +B::A +A::A +===DONE=== diff --git a/Zend/tests/bug48228.phpt b/Zend/tests/bug48228.phpt new file mode 100644 index 000000000..ae8ba617b --- /dev/null +++ b/Zend/tests/bug48228.phpt @@ -0,0 +1,32 @@ +--TEST-- +Bug #48228 (crash when exception is thrown while passing function arguments) +--FILE-- +check(do_throw()); + } +} +$l_aa=new aa(); + +$l_aa->dosome(); +?> +--EXPECTF-- + +Fatal error: Uncaught exception 'Exception' in %s +Stack trace: +#0 %s(%d): do_throw() +#1 %s(%d): aa->dosome() +#2 {main} + thrown in %s diff --git a/Zend/tests/bug48248.phpt b/Zend/tests/bug48248.phpt new file mode 100644 index 000000000..9cdb7c1a0 --- /dev/null +++ b/Zend/tests/bug48248.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #48248 (SIGSEGV when access to private property via &__get) +--FILE-- +test; + } +} + +class B extends A +{ + private $test; +} + +$b = new B; +var_dump($b->test); + +?> +--EXPECTF-- +Notice: Undefined property: B::$test in %s on line %d + +Notice: Only variable references should be returned by reference in %s on line %d +NULL diff --git a/Zend/tests/bug48408.phpt b/Zend/tests/bug48408.phpt new file mode 100644 index 000000000..20a019807 --- /dev/null +++ b/Zend/tests/bug48408.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #48408 (crash when exception is thrown while passing function arguments) +--FILE-- +process($c->generate(0)); +} +catch(Exception $e){ + $c->generate(0); +} +?> +--EXPECTF-- + +Fatal error: Uncaught exception 'Exception' in %s +Stack trace: +#0 %s(%d): C->generate(0) +#1 {main} + thrown in %s diff --git a/Zend/tests/bug48409.phpt b/Zend/tests/bug48409.phpt new file mode 100644 index 000000000..238b52ed7 --- /dev/null +++ b/Zend/tests/bug48409.phpt @@ -0,0 +1,67 @@ +--TEST-- +Bug #48409 (crash when exception is thrown while passing function arguments) +--FILE-- + 'xyz'); + } +} + +class CCC +{ + public function process($p) + { + return $p; + } +} + +class AAA +{ + public function func() + { + $b = new BBB; + $c = new CCC; + $i = 34; + $item = array('foo' => 'bar'); + try { + $c->process($b->xyz($item['foo'], $i)); + } + catch(ABCException $e) { + $b->xyz($item['foo'], $i); + } + } // end func(); +} + +class Runner +{ + public function run($x) + { + try { + $x->func(); + } + catch(ABCException $e) { + throw new Exception; + } + } +} + +try { + $runner = new Runner; + $runner->run(new AAA); +} +catch(Exception $e) { + die('Exception thrown'); +} + +?> +--EXPECT-- +Exception thrown diff --git a/Zend/tests/bug48428.phpt b/Zend/tests/bug48428.phpt new file mode 100644 index 000000000..ae9ac936a --- /dev/null +++ b/Zend/tests/bug48428.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #48428 (crash when exception is thrown while passing function arguments) +--FILE-- + getMessage()); +} +?> +--EXPECT-- +ERROR diff --git a/Zend/tests/bug48533.phpt b/Zend/tests/bug48533.phpt new file mode 100644 index 000000000..274013c7d --- /dev/null +++ b/Zend/tests/bug48533.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug #48533 (__callStatic is not invoked for private/protected methods) +--FILE-- +a(); +$x->b(); +$x->c(); +$x::a(); +$x::b(); +$x::c(); + +?> +--EXPECTF-- +%unicode|string%(9) "__call::a" +int(2) +%unicode|string%(9) "__call::c" +%unicode|string%(15) "__callStatic::a" + +Strict Standards: Non-static method foo::b() should not be called statically in %s on line %d +int(2) +%unicode|string%(15) "__callStatic::c" diff --git a/Zend/tests/call_static_006.phpt b/Zend/tests/call_static_006.phpt index 6d6b3ca77..e172f4e16 100644 --- a/Zend/tests/call_static_006.phpt +++ b/Zend/tests/call_static_006.phpt @@ -27,4 +27,4 @@ ok Strict Standards: Non-static method foo::aa() should not be called statically in %s on line %d ok -Fatal error: Can not call constructor in %s on line %d +Fatal error: Cannot call constructor in %s on line %d diff --git a/Zend/tests/exception_010.phpt b/Zend/tests/exception_010.phpt new file mode 100644 index 000000000..6bff8c6e5 --- /dev/null +++ b/Zend/tests/exception_010.phpt @@ -0,0 +1,30 @@ +--TEST-- +Testing Exception's methods +--FILE-- +gettraceasstring(1); +$x->gettraceasstring(); +$x->__tostring(1); +$x->gettrace(1); +$x->getline(1); +$x->getfile(1); +$x->getmessage(1); +$x->getcode(1); + +?> +--EXPECTF-- +Warning: Exception::getTraceAsString() expects exactly 0 parameters, 1 given in %s on line %d + +Warning: Exception::__toString() expects exactly 0 parameters, 1 given in %s on line %d + +Warning: Exception::getTrace() expects exactly 0 parameters, 1 given in %s on line %d + +Warning: Exception::getLine() expects exactly 0 parameters, 1 given in %s on line %d + +Warning: Exception::getFile() expects exactly 0 parameters, 1 given in %s on line %d + +Warning: Exception::getMessage() expects exactly 0 parameters, 1 given in %s on line %d + +Warning: Exception::getCode() expects exactly 0 parameters, 1 given in %s on line %d diff --git a/Zend/tests/function_exists_basic.phpt b/Zend/tests/function_exists_basic.phpt new file mode 100644 index 000000000..469e3d8c9 --- /dev/null +++ b/Zend/tests/function_exists_basic.phpt @@ -0,0 +1,39 @@ +--TEST-- +function_exists function : basic functionality +--FILE-- + +===Done=== +--EXPECT-- +*** Testing function_exists() : basic functionality *** +Internal function: bool(true) +User defined function: bool(true) +Case sensitivity: bool(true) +Non existent function: bool(false) +Method: bool(false) +===Done=== diff --git a/Zend/tests/function_exists_error.phpt b/Zend/tests/function_exists_error.phpt new file mode 100644 index 000000000..c95dc0718 --- /dev/null +++ b/Zend/tests/function_exists_error.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test function_exists() function : error conditions +--INI-- +--FILE-- + +===Done=== +--EXPECTF-- +*** Testing function_exists() : error conditions *** + +Too many arguments + +Warning: function_exists() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Too few arguments + +Warning: function_exists() expects exactly 1 parameter, 0 given in %s on line %d +NULL +===Done=== + diff --git a/Zend/tests/function_exists_variation1.phpt b/Zend/tests/function_exists_variation1.phpt new file mode 100644 index 000000000..16b05fc03 --- /dev/null +++ b/Zend/tests/function_exists_variation1.phpt @@ -0,0 +1,138 @@ +--TEST-- +Test function_exists() function : usage variations - test values for $str argument +--FILE-- + +===Done=== +--EXPECTF-- +*** Testing function_exists() function: with unexpected inputs for 'str' argument *** +-- Iteration 1 -- +bool(false) +-- Iteration 2 -- +bool(false) +-- Iteration 3 -- +bool(false) +-- Iteration 4 -- +bool(false) +-- Iteration 5 -- +bool(false) +-- Iteration 6 -- +bool(false) +-- Iteration 7 -- +bool(false) +-- Iteration 8 -- +bool(false) +-- Iteration 9 -- +bool(false) +-- Iteration 10 -- + +Warning: function_exists() expects parameter 1 to be string, array given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: function_exists() expects parameter 1 to be string, array given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: function_exists() expects parameter 1 to be string, array given in %s on line %d +NULL +-- Iteration 13 -- +bool(false) +-- Iteration 14 -- +bool(false) +-- Iteration 15 -- +bool(false) +-- Iteration 16 -- +bool(false) +-- Iteration 17 -- +bool(false) +-- Iteration 18 -- +bool(false) +-- Iteration 19 -- +bool(false) +-- Iteration 20 -- + +Warning: function_exists() expects parameter 1 to be string, resource given in %s on line %d +NULL +-- Iteration 21 -- +bool(false) +-- Iteration 22 -- +bool(false) +===Done=== + \ No newline at end of file diff --git a/Zend/tests/get_class_vars_003.phpt b/Zend/tests/get_class_vars_003.phpt index f9dab77c2..d2c82bb59 100644 --- a/Zend/tests/get_class_vars_003.phpt +++ b/Zend/tests/get_class_vars_003.phpt @@ -33,7 +33,7 @@ new C; ?> --EXPECT-- -array(5) { +array(6) { ["aaa"]=> int(7) ["ccc"]=> @@ -42,6 +42,8 @@ array(5) { int(1) ["aa"]=> int(4) + ["bb"]=> + int(5) ["cc"]=> int(6) } diff --git a/Zend/tests/get_class_vars_006.phpt b/Zend/tests/get_class_vars_006.phpt index 73de66ba9..d1c2844ae 100644 --- a/Zend/tests/get_class_vars_006.phpt +++ b/Zend/tests/get_class_vars_006.phpt @@ -44,5 +44,7 @@ array(1) { ["a"]=> int(1) } -array(0) { +array(1) { + ["a"]=> + int(1) } diff --git a/Zend/tests/get_defined_functions_basic.phpt b/Zend/tests/get_defined_functions_basic.phpt new file mode 100644 index 000000000..a849e32c7 --- /dev/null +++ b/Zend/tests/get_defined_functions_basic.phpt @@ -0,0 +1,59 @@ +--TEST-- +get_defined_functions() function : basic functionality +--FILE-- + +===Done=== +--EXPECT-- +*** Testing get_defined_functions() : basic functionality *** +TEST PASSED +===Done=== diff --git a/Zend/tests/get_defined_functions_error.phpt b/Zend/tests/get_defined_functions_error.phpt new file mode 100644 index 000000000..fcb01e031 --- /dev/null +++ b/Zend/tests/get_defined_functions_error.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test get_defined_functions() function : error conditions +--FILE-- + +===Done=== +--EXPECTF-- +*** Testing get_defined_functions() : error conditions *** + +-- Testing get_defined_functions() function with more than expected no. of arguments -- + +Warning: get_defined_functions() expects exactly 0 parameters, 1 given in %s on line %d +NULL + +===Done=== diff --git a/Zend/tests/int_overflow_64bit.phpt b/Zend/tests/int_overflow_64bit.phpt index 769b17926..7c5412502 100644 --- a/Zend/tests/int_overflow_64bit.phpt +++ b/Zend/tests/int_overflow_64bit.phpt @@ -22,12 +22,12 @@ foreach ($doubles as $d) { echo "Done\n"; ?> ---EXPECTF-- -int(9223372036854775807) -int(9223372036854775807) -int(9223372036854775807) +--EXPECT-- int(9223372036854775807) int(-9223372036854775808) int(-9223372036854775808) +int(0) +int(-9223372036854775808) +int(-9223372036854775808) int(-9223372036854775808) Done diff --git a/Zend/tests/int_underflow_32bit.phpt b/Zend/tests/int_underflow_32bit.phpt index 901e7cfb5..79a949aac 100644 --- a/Zend/tests/int_underflow_32bit.phpt +++ b/Zend/tests/int_underflow_32bit.phpt @@ -20,10 +20,10 @@ foreach ($doubles as $d) { echo "Done\n"; ?> ---EXPECTF-- -int(-2147483648) -int(-2147483648) -int(-2147483648) -int(-2147483648) +--EXPECT-- int(-2147483648) +int(2147483647) +int(2147483638) +int(2147483548) +int(2147482648) Done diff --git a/Zend/tests/jump12.phpt b/Zend/tests/jump12.phpt index a7fa590f0..10bebc25f 100644 --- a/Zend/tests/jump12.phpt +++ b/Zend/tests/jump12.phpt @@ -14,7 +14,6 @@ c: goto b; ?> --EXPECTF-- -Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d ok! ok! ok! diff --git a/Zend/tests/magic_methods_002.phpt b/Zend/tests/magic_methods_002.phpt index 1e8305e23..fe0a4dcc3 100644 --- a/Zend/tests/magic_methods_002.phpt +++ b/Zend/tests/magic_methods_002.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method __unset() must have public visibility and can not be static in %s on line %d +Warning: The magic method __unset() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_003.phpt b/Zend/tests/magic_methods_003.phpt index 1118a23ba..be354ecc3 100644 --- a/Zend/tests/magic_methods_003.phpt +++ b/Zend/tests/magic_methods_003.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method __unset() must have public visibility and can not be static in %s on line %d +Warning: The magic method __unset() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_004.phpt b/Zend/tests/magic_methods_004.phpt index 0ac332cb3..33a0a60c0 100644 --- a/Zend/tests/magic_methods_004.phpt +++ b/Zend/tests/magic_methods_004.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method __unset() must have public visibility and can not be static in %s on line %d +Warning: The magic method __unset() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_005.phpt b/Zend/tests/magic_methods_005.phpt index 8e8bb4e8a..76ab30087 100644 --- a/Zend/tests/magic_methods_005.phpt +++ b/Zend/tests/magic_methods_005.phpt @@ -9,4 +9,4 @@ interface a { ?> --EXPECTF-- -Warning: The magic method __call() must have public visibility and can not be static in %s on line %d +Warning: The magic method __call() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_007.phpt b/Zend/tests/magic_methods_007.phpt index d949c95ae..0630c63e9 100644 --- a/Zend/tests/magic_methods_007.phpt +++ b/Zend/tests/magic_methods_007.phpt @@ -9,6 +9,6 @@ abstract class b { ?> --EXPECTF-- -Warning: The magic method __set() must have public visibility and can not be static in %s on line %d +Warning: The magic method __set() must have public visibility and cannot be static in %s on line %d Fatal error: Method b::__set() must take exactly 2 arguments in %s on line %d diff --git a/Zend/tests/magic_methods_008.phpt b/Zend/tests/magic_methods_008.phpt index 3d9b69728..61c4fa0a2 100644 --- a/Zend/tests/magic_methods_008.phpt +++ b/Zend/tests/magic_methods_008.phpt @@ -14,6 +14,6 @@ class a extends b { ?> --EXPECTF-- -Warning: The magic method __set() must have public visibility and can not be static in %s on line %d +Warning: The magic method __set() must have public visibility and cannot be static in %s on line %d Fatal error: Access level to a::__set() must be public (as in class b) in %s on line %d diff --git a/Zend/tests/magic_methods_010.phpt b/Zend/tests/magic_methods_010.phpt index d50b35724..06d46dbd2 100644 --- a/Zend/tests/magic_methods_010.phpt +++ b/Zend/tests/magic_methods_010.phpt @@ -10,6 +10,6 @@ class a { ?> --EXPECTF-- -Warning: The magic method __toString() must have public visibility and can not be static in %s on line %d +Warning: The magic method __toString() must have public visibility and cannot be static in %s on line %d Fatal error: Method a::__tostring() cannot take arguments in %s on line %d diff --git a/Zend/tests/unset_cv05.phpt b/Zend/tests/unset_cv05.phpt index bc023c4e2..24f9c0091 100644 --- a/Zend/tests/unset_cv05.phpt +++ b/Zend/tests/unset_cv05.phpt @@ -19,6 +19,7 @@ echo $HTTP_SESSION_VARS; echo "\nok\n"; ?> --EXPECTF-- +PHP Warning: Directive 'register_long_arrays' is deprecated in PHP %d.%d and greater in Unknown on line 0 ok Warning: session_start(): Cannot send session cookie - headers already sent by (output started at %sunset_cv05.php on line %d diff --git a/Zend/tests/unset_cv06.phpt b/Zend/tests/unset_cv06.phpt index 3a70ad770..b6825947b 100644 --- a/Zend/tests/unset_cv06.phpt +++ b/Zend/tests/unset_cv06.phpt @@ -19,6 +19,7 @@ echo $x; echo "ok\n"; ?> --EXPECTF-- +PHP Warning: Directive 'register_globals' is deprecated in PHP %d.%d and greater in Unknown on line 0 1 Deprecated: Function session_register() is deprecated in %s on line %d diff --git a/Zend/zend.c b/Zend/zend.c index a27eb3d75..a5f5a58b8 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.308.2.12.2.35.2.30 2009/03/18 10:18:09 dmitry Exp $ */ +/* $Id: zend.c,v 1.308.2.12.2.35.2.33 2009/06/16 16:10:15 rasmus Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -863,7 +863,7 @@ void zend_deactivate_modules(TSRMLS_D) /* {{{ */ EG(opline_ptr) = NULL; /* we're no longer executing anything */ zend_try { - zend_hash_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC); + zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC); } zend_end_try(); } /* }}} */ @@ -1133,7 +1133,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */ } /* }}} */ -#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__) +#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__) void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn)); #endif @@ -1192,20 +1192,20 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co zval *orig_user_exception_handler; zval **params[1], *retval2, *old_exception; old_exception = EG(exception); - zend_exception_save(TSRMLS_C); + EG(exception) = NULL; params[0] = &old_exception; orig_user_exception_handler = EG(user_exception_handler); if (call_user_function_ex(CG(function_table), NULL, orig_user_exception_handler, &retval2, 1, params, 1, NULL TSRMLS_CC) == SUCCESS) { if (retval2 != NULL) { zval_ptr_dtor(&retval2); } - zend_exception_restore(TSRMLS_C); if (EG(exception)) { zval_ptr_dtor(&EG(exception)); EG(exception) = NULL; } + zval_ptr_dtor(&old_exception); } else { - zend_exception_restore(TSRMLS_C); + EG(exception) = old_exception; zend_exception_error(EG(exception), E_ERROR TSRMLS_CC); } } else { diff --git a/Zend/zend.h b/Zend/zend.h index b36195a6d..27af9bf7b 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.293.2.11.2.9.2.33 2009/03/18 01:08:12 mattwil Exp $ */ +/* $Id: zend.h,v 1.293.2.11.2.9.2.37 2009/06/17 08:55:23 rasmus Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -34,8 +34,6 @@ #define END_EXTERN_C() #endif -#include - /* * general definitions */ @@ -67,6 +65,8 @@ /* all HAVE_XXX test have to be after the include of zend_config above */ +#include + #ifdef HAVE_UNIX_H # include #endif @@ -192,6 +192,12 @@ char *alloca (); # define ZEND_FASTCALL #endif +#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3400 +#else +# define __restrict__ +#endif +#define restrict __restrict__ + #if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN) # define ZEND_ALLOCA_MAX_SIZE (32 * 1024) # define ALLOCA_FLAG(name) \ @@ -286,7 +292,7 @@ static const char long_min_digits[] = "9223372036854775808"; #define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC #define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC -#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__) +#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__) void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((noreturn)); #else # define zend_error_noreturn zend_error @@ -361,7 +367,12 @@ struct _zval_struct { #define Z_SET_ISREF_TO(z, isref) Z_SET_ISREF_TO_P(&(z), isref) #if defined(__GNUC__) +#if __GNUC__ >= 3 #define zend_always_inline inline __attribute__((always_inline)) +#else +#define zend_always_inline inline +#endif + #elif defined(_MSC_VER) #define zend_always_inline __forceinline #else diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 3890769d4..578822979 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.296.2.27.2.34.2.60 2009/01/14 11:56:08 dmitry Exp $ */ +/* $Id: zend_API.c,v 1.296.2.27.2.34.2.64 2009/06/04 18:20:42 mattwil Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -313,6 +313,7 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp switch (c) { case 'l': + case 'L': { long *p = va_arg(*va, long *); switch (Z_TYPE_PP(arg)) { @@ -324,14 +325,33 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), p, &d, -1)) == 0) { return "long"; } else if (type == IS_DOUBLE) { - *p = (long) d; + if (c == 'L') { + if (d > LONG_MAX) { + *p = LONG_MAX; + break; + } else if (d < LONG_MIN) { + *p = LONG_MIN; + break; + } + } + + *p = zend_dval_to_lval(d); } } break; + case IS_DOUBLE: + if (c == 'L') { + if (Z_DVAL_PP(arg) > LONG_MAX) { + *p = LONG_MAX; + break; + } else if (Z_DVAL_PP(arg) < LONG_MIN) { + *p = LONG_MIN; + break; + } + } case IS_NULL: case IS_LONG: - case IS_DOUBLE: case IS_BOOL: convert_to_long_ex(arg); *p = Z_LVAL_PP(arg); @@ -1929,7 +1949,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio fname_len = strlen(ptr->fname); lowercase_name = zend_str_tolower_dup(ptr->fname, fname_len); if (zend_hash_exists(target_function_table, lowercase_name, fname_len+1)) { - efree(lowercase_name); zend_error(error_type, "Function registration failed - duplicate name - %s%s%s", scope ? scope->name : "", scope ? "::" : "", ptr->fname); } efree(lowercase_name); @@ -2541,12 +2560,18 @@ get_function_via_handler: fcc->object_ptr = EG(This); if (error) { zend_spprintf(error, 0, "non-static method %s::%s() %s be called statically, assuming $this from compatible context %s", fcc->calling_scope->name, fcc->function_handler->common.function_name, verb, Z_OBJCE_P(EG(This))->name); + if (severity == E_ERROR) { + retval = 0; + } } else if (retval) { zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from compatible context %s", fcc->calling_scope->name, fcc->function_handler->common.function_name, verb, Z_OBJCE_P(EG(This))->name); } } else { if (error) { zend_spprintf(error, 0, "non-static method %s::%s() %s be called statically", fcc->calling_scope->name, fcc->function_handler->common.function_name, verb); + if (severity == E_ERROR) { + retval = 0; + } } else if (retval) { zend_error(severity, "Non-static method %s::%s() %s be called statically", fcc->calling_scope->name, fcc->function_handler->common.function_name, verb); } @@ -2851,9 +2876,6 @@ ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_i ZEND_API void zend_fcall_info_args_clear(zend_fcall_info *fci, int free_mem) /* {{{ */ { if (fci->params) { - while (fci->param_count) { - zval_ptr_dtor(fci->params[--fci->param_count]); - } if (free_mem) { efree(fci->params); fci->params = NULL; @@ -2901,7 +2923,6 @@ ZEND_API int zend_fcall_info_args(zend_fcall_info *fci, zval *args TSRMLS_DC) /* zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(args), &pos); while (zend_hash_get_current_data_ex(Z_ARRVAL_P(args), (void *) &arg, &pos) == SUCCESS) { *params++ = arg; - Z_ADDREF_P(*arg); zend_hash_move_forward_ex(Z_ARRVAL_P(args), &pos); } @@ -2924,7 +2945,6 @@ ZEND_API int zend_fcall_info_argp(zend_fcall_info *fci TSRMLS_DC, int argc, zval fci->params = (zval ***) erealloc(fci->params, fci->param_count * sizeof(zval **)); for (i = 0; i < argc; ++i) { - Z_ADDREF_P(*(argv[i])); fci->params[i] = argv[i]; } } @@ -2950,7 +2970,6 @@ ZEND_API int zend_fcall_info_argv(zend_fcall_info *fci TSRMLS_DC, int argc, va_l for (i = 0; i < argc; ++i) { arg = va_arg(*argv, zval **); - Z_ADDREF_P(*arg); fci->params[i] = arg; } } diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 870171207..9eafda448 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_alloc.c,v 1.144.2.3.2.43.2.22 2009/03/20 11:23:00 dmitry Exp $ */ +/* $Id: zend_alloc.c,v 1.144.2.3.2.43.2.24 2009/05/30 16:42:13 lbarnaud Exp $ */ #include "zend.h" #include "zend_alloc.h" @@ -150,7 +150,12 @@ static zend_mm_segment* zend_mm_mem_mmap_realloc(zend_mm_storage *storage, zend_ { zend_mm_segment *ret; #ifdef HAVE_MREMAP +#if defined(__NetBSD__) + /* NetBSD 5 supports mremap but takes an extra newp argument */ + ret = (zend_mm_segment*)mremap(segment, segment->size, segment, size, MREMAP_MAYMOVE); +#else ret = (zend_mm_segment*)mremap(segment, segment->size, size, MREMAP_MAYMOVE); +#endif if (ret == MAP_FAILED) { #endif ret = storage->handlers->_alloc(storage, size); @@ -2491,7 +2496,11 @@ ZEND_API size_t zend_memory_usage(int real_usage TSRMLS_DC) if (real_usage) { return AG(mm_heap)->real_size; } else { - return AG(mm_heap)->size; + size_t usage = AG(mm_heap)->size; +#if ZEND_MM_CACHE + usage -= AG(mm_heap)->cached; +#endif + return usage; } } diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index a33b66c36..e965c5dee 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.47 2009/03/16 09:51:31 dmitry Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.52 2009/06/08 21:27:05 pajoye Exp $ */ #include "zend.h" #include "zend_API.h" @@ -629,6 +629,7 @@ ZEND_FUNCTION(define) zend_bool non_cs = 0; int case_sensitive = CONST_CS; zend_constant c; + char *p; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|b", &name, &name_len, &val, &non_cs) == FAILURE) { return; @@ -638,6 +639,34 @@ ZEND_FUNCTION(define) case_sensitive = 0; } + /* class constant, check if there is name and make sure class is valid & exists */ + if ((p = zend_memnstr(name, "::", sizeof("::") - 1, name + name_len))) { + char *class_name; + int found; + zend_class_entry **ce; + ALLOCA_FLAG(use_heap) + + if (p == (name + name_len - sizeof("::") + 1)) { + zend_error(E_WARNING, "Class constant must have a name"); + RETURN_FALSE; + } else if (p == name) { + zend_error(E_WARNING, "Missing class name"); + RETURN_FALSE; + } + + class_name = do_alloca((p - name + 1), use_heap); + zend_str_tolower_copy(class_name, name, (p - name)); + + found = zend_hash_find(EG(class_table), class_name, p - name + 1, (void **) &ce); + + if (found != SUCCESS) { + zend_error(E_WARNING, "Class '%s' does not exist", class_name); + free_alloca(class_name, use_heap); + RETURN_FALSE; + } + free_alloca(class_name, use_heap); + } + repeat: switch (Z_TYPE_P(val)) { case IS_LONG: @@ -890,27 +919,22 @@ static void add_class_vars(zend_class_entry *ce, HashTable *properties, zval *re while (zend_hash_get_current_data_ex(properties, (void **) &prop, &pos) == SUCCESS) { char *key, *class_name, *prop_name; uint key_len; - ulong num_index, h; + ulong num_index; int prop_name_len = 0; zval *prop_copy; zend_property_info *property_info; + zval zprop_name; zend_hash_get_current_key_ex(properties, &key, &key_len, &num_index, 0, &pos); zend_hash_move_forward_ex(properties, &pos); zend_unmangle_property_name(key, key_len-1, &class_name, &prop_name); prop_name_len = strlen(prop_name); - - h = zend_get_hash_value(prop_name, prop_name_len+1); - if (zend_hash_quick_find(&ce->properties_info, prop_name, prop_name_len+1, h, (void **) &property_info) == FAILURE) { - continue; - } - - if (property_info->flags & ZEND_ACC_SHADOW) { - continue; - } else if ((property_info->flags & ZEND_ACC_PRIVATE) && EG(scope) != ce) { - continue; - } else if ((property_info->flags & ZEND_ACC_PROTECTED) && zend_check_protected(ce, EG(scope)) == 0) { + + ZVAL_STRINGL(&zprop_name, prop_name, prop_name_len, 0); + property_info = zend_get_property_info(ce, &zprop_name, 1 TSRMLS_CC); + + if (!property_info || property_info == &EG(std_property_info)) { continue; } @@ -1678,7 +1702,7 @@ ZEND_FUNCTION(get_defined_vars) ZEND_FUNCTION(create_function) { char *eval_code, *function_name, *function_args, *function_code; - int function_name_length, function_args_len, function_code_len; + int eval_code_length, function_name_length, function_args_len, function_code_len; int retval; char *eval_name; @@ -1686,10 +1710,29 @@ ZEND_FUNCTION(create_function) return; } - zend_spprintf(&eval_code, 0, "function " LAMBDA_TEMP_FUNCNAME "(%s){%s}", function_args, function_code); + eval_code = (char *) emalloc(sizeof("function " LAMBDA_TEMP_FUNCNAME) + +function_args_len + +2 /* for the args parentheses */ + +2 /* for the curly braces */ + +function_code_len); + + eval_code_length = sizeof("function " LAMBDA_TEMP_FUNCNAME "(") - 1; + memcpy(eval_code, "function " LAMBDA_TEMP_FUNCNAME "(", eval_code_length); + + memcpy(eval_code + eval_code_length, function_args, function_args_len); + eval_code_length += function_args_len; + + eval_code[eval_code_length++] = ')'; + eval_code[eval_code_length++] = '{'; + + memcpy(eval_code + eval_code_length, function_code, function_code_len); + eval_code_length += function_code_len; + + eval_code[eval_code_length++] = '}'; + eval_code[eval_code_length] = '\0'; eval_name = zend_make_compiled_string_description("runtime-created function" TSRMLS_CC); - retval = zend_eval_string(eval_code, NULL, eval_name TSRMLS_CC); + retval = zend_eval_stringl(eval_code, eval_code_length, NULL, eval_name TSRMLS_CC); efree(eval_code); efree(eval_name); @@ -1704,10 +1747,10 @@ ZEND_FUNCTION(create_function) function_add_ref(&new_function); function_name = (char *) emalloc(sizeof("0lambda_")+MAX_LENGTH_OF_LONG); + function_name[0] = '\0'; do { - sprintf(function_name, "%clambda_%d", 0, ++EG(lambda_count)); - function_name_length = strlen(function_name+1)+1; + function_name_length = 1 + sprintf(function_name + 1, "lambda_%d", ++EG(lambda_count)); } while (zend_hash_add(EG(function_table), function_name, function_name_length+1, &new_function, sizeof(zend_function), NULL)==FAILURE); zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME)); RETURN_STRINGL(function_name, function_name_length, 0); @@ -1805,19 +1848,19 @@ ZEND_FUNCTION(get_loaded_extensions) /* }}} */ -/* {{{ proto array get_defined_constants([mixed categorize]) +/* {{{ proto array get_defined_constants([bool categorize]) Return an array containing the names and values of all defined constants */ ZEND_FUNCTION(get_defined_constants) { - int argc = ZEND_NUM_ARGS(); - - if (argc != 0 && argc != 1) { - ZEND_WRONG_PARAM_COUNT(); + zend_bool categorize = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &categorize) == FAILURE) { + return; } array_init(return_value); - if (argc) { + if (categorize) { HashPosition pos; zend_constant *val; int module_number; diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index ae1487818..06608abd0 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.103 2009/03/10 10:01:44 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.109 2009/06/07 15:46:51 mattwil Exp $ */ #include #include "zend.h" @@ -1197,16 +1197,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n if (is_method) { if (zend_hash_add(&CG(active_class_entry)->function_table, lcname, name_len+1, &op_array, sizeof(zend_op_array), (void **) &CG(active_op_array)) == FAILURE) { - zend_op_array *child_op_array, *parent_op_array; - if (CG(active_class_entry)->parent - && (zend_hash_find(&CG(active_class_entry)->function_table, name, name_len+1, (void **) &child_op_array) == SUCCESS) - && (zend_hash_find(&CG(active_class_entry)->parent->function_table, name, name_len+1, (void **) &parent_op_array) == SUCCESS) - && (child_op_array == parent_op_array)) { - zend_hash_update(&CG(active_class_entry)->function_table, name, name_len+1, &op_array, sizeof(zend_op_array), (void **) &CG(active_op_array)); - } else { - efree(lcname); - zend_error(E_COMPILE_ERROR, "Cannot redeclare %s::%s()", CG(active_class_entry)->name, name); - } + zend_error(E_COMPILE_ERROR, "Cannot redeclare %s::%s()", CG(active_class_entry)->name, name); } if (fn_flags & ZEND_ACC_ABSTRACT) { @@ -1220,7 +1211,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n if (CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE) { if ((name_len == sizeof(ZEND_CALL_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __call() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __call() must have public visibility and cannot be static"); } } else if ((name_len == sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CALLSTATIC_FUNC_NAME, sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1))) { if ((fn_flags & (ZEND_ACC_PPP_MASK ^ ZEND_ACC_PUBLIC)) || (fn_flags & ZEND_ACC_STATIC) == 0) { @@ -1228,23 +1219,23 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n } } else if ((name_len == sizeof(ZEND_GET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __get() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __get() must have public visibility and cannot be static"); } } else if ((name_len == sizeof(ZEND_SET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __set() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __set() must have public visibility and cannot be static"); } } else if ((name_len == sizeof(ZEND_UNSET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_UNSET_FUNC_NAME, sizeof(ZEND_UNSET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __unset() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __unset() must have public visibility and cannot be static"); } } else if ((name_len == sizeof(ZEND_ISSET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_ISSET_FUNC_NAME, sizeof(ZEND_ISSET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __isset() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __isset() must have public visibility and cannot be static"); } } else if ((name_len == sizeof(ZEND_TOSTRING_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __toString() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __toString() must have public visibility and cannot be static"); } } } else { @@ -1280,7 +1271,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n CG(active_class_entry)->clone = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_CALL_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __call() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __call() must have public visibility and cannot be static"); } CG(active_class_entry)->__call = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CALLSTATIC_FUNC_NAME, sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1))) { @@ -1290,27 +1281,27 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n CG(active_class_entry)->__callstatic = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_GET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __get() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __get() must have public visibility and cannot be static"); } CG(active_class_entry)->__get = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_SET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __set() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __set() must have public visibility and cannot be static"); } CG(active_class_entry)->__set = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_UNSET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_UNSET_FUNC_NAME, sizeof(ZEND_UNSET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __unset() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __unset() must have public visibility and cannot be static"); } CG(active_class_entry)->__unset = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_ISSET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_ISSET_FUNC_NAME, sizeof(ZEND_ISSET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __isset() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __isset() must have public visibility and cannot be static"); } CG(active_class_entry)->__isset = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_TOSTRING_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_WARNING, "The magic method __toString() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __toString() must have public visibility and cannot be static"); } CG(active_class_entry)->__tostring = (zend_function *) CG(active_op_array); } else if (!(fn_flags & ZEND_ACC_STATIC)) { @@ -2640,7 +2631,7 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f if (!zend_do_perform_implementation_check(child, child->common.prototype)) { zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name); } - } else if (EG(error_reporting) & E_STRICT) { /* Check E_STRICT before the check so that we save some time */ + } else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */ if (!zend_do_perform_implementation_check(child, parent)) { zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name); } @@ -2891,24 +2882,20 @@ ZEND_API int do_bind_function(zend_op *opline, HashTable *function_table, zend_b { zend_function *function; - if (opline->opcode != ZEND_DECLARE_FUNCTION) { - zend_error(E_COMPILE_ERROR, "Internal compiler error. Please report!"); - } - zend_hash_find(function_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void *) &function); if (zend_hash_add(function_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, function, sizeof(zend_function), NULL)==FAILURE) { int error_level = compile_time ? E_COMPILE_ERROR : E_ERROR; - zend_function *function; + zend_function *old_function; - if (zend_hash_find(function_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, (void *) &function)==SUCCESS - && function->type==ZEND_USER_FUNCTION - && ((zend_op_array *) function)->last>0) { + if (zend_hash_find(function_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, (void *) &old_function)==SUCCESS + && old_function->type == ZEND_USER_FUNCTION + && old_function->op_array.last > 0) { zend_error(error_level, "Cannot redeclare %s() (previously declared in %s:%d)", - opline->op2.u.constant.value.str.val, - ((zend_op_array *) function)->filename, - ((zend_op_array *) function)->opcodes[0].lineno); + function->common.function_name, + old_function->op_array.filename, + old_function->op_array.opcodes[0].lineno); } else { - zend_error(error_level, "Cannot redeclare %s()", opline->op2.u.constant.value.str.val); + zend_error(error_level, "Cannot redeclare %s()", function->common.function_name); } return FAILURE; } else { @@ -2982,13 +2969,6 @@ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op *opline, HashTa /* Register the derived class */ if (zend_hash_add(class_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, pce, sizeof(zend_class_entry *), NULL)==FAILURE) { zend_error(E_COMPILE_ERROR, "Cannot redeclare class %s", ce->name); - ce->refcount--; - zend_hash_destroy(&ce->function_table); - zend_hash_destroy(&ce->default_properties); - zend_hash_destroy(&ce->properties_info); - zend_hash_destroy(&ce->default_static_members); - zend_hash_destroy(&ce->constants_table); - return NULL; } return ce; } @@ -3456,8 +3436,6 @@ void zend_do_end_class_declaration(const znode *class_token, const znode *parent { zend_class_entry *ce = CG(active_class_entry); - do_inherit_parent_constructor(ce); - if (ce->constructor) { ce->constructor->common.fn_flags |= ZEND_ACC_CTOR; if (ce->constructor->common.fn_flags & ZEND_ACC_STATIC) { @@ -3482,7 +3460,7 @@ void zend_do_end_class_declaration(const znode *class_token, const znode *parent if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) && ((parent_token->op_type != IS_UNUSED) || (ce->num_interfaces > 0))) { zend_verify_abstract_class(ce TSRMLS_CC); - if (ce->parent || ce->num_interfaces) { + if (ce->num_interfaces) { do_verify_abstract_class(TSRMLS_C); } } @@ -4041,7 +4019,7 @@ void zend_do_add_static_array_element(znode *result, znode *offset, const znode zend_hash_index_update(Z_ARRVAL(result->u.constant), Z_LVAL(offset->u.constant), &element, sizeof(zval *), NULL); break; case IS_DOUBLE: - zend_hash_index_update(Z_ARRVAL(result->u.constant), (long)Z_DVAL(offset->u.constant), &element, sizeof(zval *), NULL); + zend_hash_index_update(Z_ARRVAL(result->u.constant), zend_dval_to_lval(Z_DVAL(offset->u.constant)), &element, sizeof(zval *), NULL); break; case IS_CONSTANT_ARRAY: zend_error(E_ERROR, "Illegal offset type"); @@ -4594,8 +4572,6 @@ void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC) if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, "ticks", sizeof("ticks")-1)) { convert_to_long(&val->u.constant); CG(declarables).ticks = val->u.constant; - - zend_error(E_DEPRECATED, "Ticks is deprecated and will be removed in PHP 6"); #ifdef ZEND_MULTIBYTE } else if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, "encoding", sizeof("encoding")-1)) { zend_encoding *new_encoding, *old_encoding; diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 0227c5582..1771b5391 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.316.2.8.2.12.2.39 2009/01/26 22:54:20 cseiler Exp $ */ +/* $Id: zend_compile.h,v 1.316.2.8.2.12.2.40 2009/06/05 23:20:59 shire Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -582,7 +582,7 @@ void init_op(zend_op *op TSRMLS_DC); int get_next_op_number(zend_op_array *op_array); int print_class(zend_class_entry *class_entry TSRMLS_DC); void print_op_array(zend_op_array *op_array, int optimizations); -int pass_two(zend_op_array *op_array TSRMLS_DC); +ZEND_API int pass_two(zend_op_array *op_array TSRMLS_DC); zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array); void zend_do_first_catch(znode *open_parentheses TSRMLS_DC); void zend_initialize_try_catch_element(const znode *try_token TSRMLS_DC); diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 769b91218..fc9a744cd 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_exceptions.c,v 1.79.2.6.2.9.2.20 2009/01/02 13:14:49 helly Exp $ */ +/* $Id: zend_exceptions.c,v 1.79.2.6.2.9.2.22 2009/05/11 15:03:46 felipe Exp $ */ #include "zend.h" #include "zend_API.h" @@ -487,9 +487,14 @@ static int _build_trace_string(zval **frame TSRMLS_DC, int num_args, va_list arg ZEND_METHOD(exception, getTraceAsString) { zval *trace; - char *res = estrdup(""), **str = &res, *s_tmp; + char *res, **str, *s_tmp; int res_len = 0, *len = &res_len, num = 0; + DEFAULT_0_PARAMS; + + res = estrdup(""); + str = &res; + trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC); zend_hash_apply_with_arguments(Z_ARRVAL_P(trace) TSRMLS_CC, (apply_func_args_t)_build_trace_string, 3, str, len, &num); @@ -508,6 +513,9 @@ ZEND_METHOD(exception, getTraceAsString) ZEND_METHOD(exception, getPrevious) { zval *previous; + + DEFAULT_0_PARAMS; + previous = zend_read_property(default_exception_ce, getThis(), "previous", sizeof("previous")-1, 1 TSRMLS_CC); RETURN_ZVAL(previous, 1, 0); } @@ -529,10 +537,14 @@ int zend_spprintf(char **message, int max_len, char *format, ...) /* {{{ */ ZEND_METHOD(exception, __toString) { zval message, file, line, *trace, *exception; - char *str = estrndup("", 0), *prev_str; + char *str, *prev_str; int len = 0; zend_fcall_info fci; zval fname; + + DEFAULT_0_PARAMS; + + str = estrndup("", 0); exception = getThis(); ZVAL_STRINGL(&fname, "gettraceasstring", sizeof("gettraceasstring")-1, 1); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index e6096df74..bc0000b53 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.716.2.12.2.24.2.41 2009/03/18 14:15:28 dmitry Exp $ */ +/* $Id: zend_execute.c,v 1.716.2.12.2.24.2.44 2009/06/04 18:20:42 mattwil Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -518,13 +518,13 @@ static inline int zend_verify_arg_type(zend_function *zf, zend_uint arg_num, zva static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval *property_name, znode *value_op, const temp_variable *Ts, int opcode TSRMLS_DC) { - zval *object; + zval *object = *object_ptr; zend_free_op free_value; zval *value = get_zval_ptr(value_op, Ts, &free_value, BP_VAR_R); zval **retval = &T(result->u.var).var.ptr; - if (Z_TYPE_P(*object_ptr) != IS_OBJECT) { - if (*object_ptr == EG(error_zval_ptr)) { + if (Z_TYPE_P(object) != IS_OBJECT) { + if (object == EG(error_zval_ptr)) { if (!RETURN_VALUE_UNUSED(result)) { *retval = EG(uninitialized_zval_ptr); PZVAL_LOCK(*retval); @@ -532,13 +532,14 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval FREE_OP(free_value); return; } - if (Z_TYPE_PP(object_ptr) == IS_NULL || - (Z_TYPE_PP(object_ptr) == IS_BOOL && Z_LVAL_PP(object_ptr) == 0) || - (Z_TYPE_PP(object_ptr) == IS_STRING && Z_STRLEN_PP(object_ptr) == 0)) { - zend_error(E_STRICT, "Creating default object from empty value"); + if (Z_TYPE_P(object) == IS_NULL || + (Z_TYPE_P(object) == IS_BOOL && Z_LVAL_P(object) == 0) || + (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0)) { SEPARATE_ZVAL_IF_NOT_REF(object_ptr); zval_dtor(*object_ptr); object_init(*object_ptr); + object = *object_ptr; + zend_error(E_STRICT, "Creating default object from empty value"); } else { zend_error(E_WARNING, "Attempt to assign property of non-object"); if (!RETURN_VALUE_UNUSED(result)) { @@ -550,9 +551,6 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval } } - /* here we are sure we are dealing with an object */ - object = *object_ptr; - /* separate our value if necessary */ if (value_op->op_type == IS_TMP_VAR) { zval *orig_value = value; @@ -825,10 +823,9 @@ fetch_string_dim: } } break; - case IS_DOUBLE: { - DVAL_TO_LVAL(Z_DVAL_P(dim), index); + case IS_DOUBLE: + index = zend_dval_to_lval(Z_DVAL_P(dim)); goto num_index; - } case IS_RESOURCE: zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_LVAL_P(dim), Z_LVAL_P(dim)); /* Fall Through */ diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 47c5fbd3d..9f9e5d48a 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.h,v 1.84.2.4.2.8.2.12 2008/12/31 11:15:32 sebastian Exp $ */ +/* $Id: zend_execute.h,v 1.84.2.4.2.8.2.15 2009/06/09 09:26:02 pajoye Exp $ */ #ifndef ZEND_EXECUTE_H #define ZEND_EXECUTE_H @@ -73,7 +73,9 @@ static inline void safe_free_zval_ptr_rel(zval *p ZEND_FILE_LINE_DC ZEND_FILE_LI ZEND_API int zend_lookup_class(const char *name, int name_length, zend_class_entry ***ce TSRMLS_DC); ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_autoload, zend_class_entry ***ce TSRMLS_DC); ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC); +ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *string_name TSRMLS_DC); ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC); +ZEND_API int zend_eval_stringl_ex(char *str, int str_len, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC); static inline int i_zend_is_true(zval *op) { @@ -290,6 +292,27 @@ static inline zval** zend_vm_stack_get_arg(int requested_arg TSRMLS_DC) return (zval**)p - arg_count + requested_arg - 1; } +static inline void zend_arg_types_stack_2_pop(zend_ptr_stack *stack, zval **object, zend_function **fbc) +{ + void *a, *b; + + zend_ptr_stack_2_pop(stack, &a, &b); + + *object = (zval *) a; + *fbc = (zend_function *) b; +} + +static inline void zend_arg_types_stack_3_pop(zend_ptr_stack *stack, zend_class_entry **called_scope, zval **object, zend_function **fbc) +{ + void *a, *b, *c; + + zend_ptr_stack_3_pop(stack, &a, &b, &c); + + *called_scope = (zend_class_entry *) a; + *object = (zval *) b; + *fbc = (zend_function *) c; +} + void execute_new_code(TSRMLS_D); diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index b0e7a9e92..42f5f50e7 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.75 2009/03/19 18:34:16 mattwil Exp $ */ +/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.78 2009/06/05 18:50:32 mattwil Exp $ */ #include #include @@ -662,7 +662,7 @@ ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *sco ret = zend_hash_update_current_key_ex(Z_ARRVAL_P(p), HASH_KEY_IS_LONG, NULL, 0, Z_LVAL(const_value), HASH_UPDATE_KEY_IF_BEFORE, NULL); break; case IS_DOUBLE: - ret = zend_hash_update_current_key_ex(Z_ARRVAL_P(p), HASH_KEY_IS_LONG, NULL, 0, (long)Z_DVAL(const_value), HASH_UPDATE_KEY_IF_BEFORE, NULL); + ret = zend_hash_update_current_key_ex(Z_ARRVAL_P(p), HASH_KEY_IS_LONG, NULL, 0, zend_dval_to_lval(Z_DVAL(const_value)), HASH_UPDATE_KEY_IF_BEFORE, NULL); break; case IS_NULL: ret = zend_hash_update_current_key_ex(Z_ARRVAL_P(p), HASH_KEY_IS_STRING, "", 1, 0, HASH_UPDATE_KEY_IF_BEFORE, NULL); @@ -1020,6 +1020,7 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut zend_fcall_info fcall_info; zend_fcall_info_cache fcall_cache; char dummy = 1; + ulong hash; ALLOCA_FLAG(use_heap) if (name == NULL || !name_length) { @@ -1035,7 +1036,9 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut lc_length -= 1; } - if (zend_hash_find(EG(class_table), lc_name, lc_length, (void **) ce) == SUCCESS) { + hash = zend_inline_hash_func(lc_name, lc_length); + + if (zend_hash_quick_find(EG(class_table), lc_name, lc_length, hash, (void **) ce) == SUCCESS) { free_alloca(lc_free, use_heap); return SUCCESS; } @@ -1053,7 +1056,7 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut zend_hash_init(EG(in_autoload), 0, NULL, NULL, 0); } - if (zend_hash_add(EG(in_autoload), lc_name, lc_length, (void**)&dummy, sizeof(char), NULL) == FAILURE) { + if (zend_hash_quick_add(EG(in_autoload), lc_name, lc_length, hash, (void**)&dummy, sizeof(char), NULL) == FAILURE) { free_alloca(lc_free, use_heap); return FAILURE; } @@ -1090,7 +1093,7 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut zval_ptr_dtor(&class_name_ptr); - zend_hash_del(EG(in_autoload), lc_name, lc_length); + zend_hash_quick_del(EG(in_autoload), lc_name, lc_length, hash); if (retval_ptr) { zval_ptr_dtor(&retval_ptr); @@ -1101,7 +1104,7 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut return FAILURE; } - retval = zend_hash_find(EG(class_table), lc_name, lc_length, (void **) ce); + retval = zend_hash_quick_find(EG(class_table), lc_name, lc_length, hash, (void **) ce); free_alloca(lc_free, use_heap); return retval; } @@ -1113,7 +1116,7 @@ ZEND_API int zend_lookup_class(const char *name, int name_length, zend_class_ent } /* }}} */ -ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC) /* {{{ */ +ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *string_name TSRMLS_DC) /* {{{ */ { zval pv; zend_op_array *new_op_array; @@ -1122,15 +1125,14 @@ ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSR int retval; if (retval_ptr) { - int l = strlen(str); - Z_STRLEN(pv) = l + sizeof("return ;") - 1; + Z_STRLEN(pv) = str_len + sizeof("return ;") - 1; Z_STRVAL(pv) = emalloc(Z_STRLEN(pv) + 1); memcpy(Z_STRVAL(pv), "return ", sizeof("return ") - 1); - memcpy(Z_STRVAL(pv) + sizeof("return ") - 1, str, l); + memcpy(Z_STRVAL(pv) + sizeof("return ") - 1, str, str_len); Z_STRVAL(pv)[Z_STRLEN(pv) - 1] = ';'; Z_STRVAL(pv)[Z_STRLEN(pv)] = '\0'; } else { - Z_STRLEN(pv) = strlen(str); + Z_STRLEN(pv) = str_len; Z_STRVAL(pv) = str; } Z_TYPE(pv) = IS_STRING; @@ -1185,11 +1187,17 @@ ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSR } /* }}} */ -ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC) /* {{{ */ +ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC) /* {{{ */ +{ + return zend_eval_stringl(str, strlen(str), retval_ptr, string_name TSRMLS_CC); +} +/* }}} */ + +ZEND_API int zend_eval_stringl_ex(char *str, int str_len, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC) /* {{{ */ { int result; - result = zend_eval_string(str, retval_ptr, string_name TSRMLS_CC); + result = zend_eval_stringl(str, str_len, retval_ptr, string_name TSRMLS_CC); if (handle_exceptions && EG(exception)) { zend_exception_error(EG(exception), E_ERROR TSRMLS_CC); result = FAILURE; @@ -1198,6 +1206,12 @@ ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, } /* }}} */ +ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC) /* {{{ */ +{ + return zend_eval_stringl_ex(str, strlen(str), retval_ptr, string_name, handle_exceptions TSRMLS_CC); +} +/* }}} */ + void execute_new_code(TSRMLS_D) /* {{{ */ { zend_op *opline, *end; diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index 04e4c4f6f..a1a6fcd52 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_extensions.c,v 1.48.2.1.2.3.2.4 2009/01/17 02:05:13 stas Exp $ */ +/* $Id: zend_extensions.c,v 1.48.2.1.2.3.2.6 2009/04/08 13:26:35 mattwil Exp $ */ #include "zend_extensions.h" @@ -79,8 +79,9 @@ int zend_load_extension(const char *path) DL_UNLOAD(handle); return FAILURE; } - } else if (strcmp(ZEND_EXTENSION_BUILD_ID, extension_version_info->build_id)) { - fprintf(stderr, "Cannot load %s - it was build with configuration %s, whereas running engine is %s\n", + } else if (strcmp(ZEND_EXTENSION_BUILD_ID, extension_version_info->build_id) && + (!new_extension->build_id_check || new_extension->build_id_check(ZEND_EXTENSION_BUILD_ID) != SUCCESS)) { + fprintf(stderr, "Cannot load %s - it was built with configuration %s, whereas running engine is %s\n", new_extension->name, extension_version_info->build_id, ZEND_EXTENSION_BUILD_ID); DL_UNLOAD(handle); return FAILURE; diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index e550e148b..2fd1e63c1 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_extensions.h,v 1.67.2.3.2.3.2.6 2009/01/17 16:14:59 johannes Exp $ */ +/* $Id: zend_extensions.h,v 1.67.2.3.2.3.2.8 2009/04/08 23:06:16 stas Exp $ */ #ifndef ZEND_EXTENSIONS_H #define ZEND_EXTENSIONS_H @@ -80,7 +80,7 @@ struct _zend_extension { op_array_dtor_func_t op_array_dtor; int (*api_no_check)(int api_no); - void *reserved2; + int (*build_id_check)(const char* build_id); void *reserved3; void *reserved4; void *reserved5; @@ -103,8 +103,9 @@ END_EXTERN_C() #define ZEND_EXTENSION() \ ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_EXTENSION_BUILD_ID } -#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1 -#define COMPAT_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1 +#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1 +#define COMPAT_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1 +#define BUILD_COMPAT_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1 ZEND_API extern zend_llist zend_extensions; diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c index 64ffaf108..52e37ddcd 100644 --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_gc.c,v 1.1.2.21 2009/02/18 12:02:53 dmitry Exp $ */ +/* $Id: zend_gc.c,v 1.1.2.22 2009/04/03 18:52:21 dmitry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -30,12 +30,6 @@ ZEND_API int gc_globals_id; ZEND_API zend_gc_globals gc_globals; #endif -/* Forward declarations */ -static int children_scan_black(zval **pz TSRMLS_DC); -static int children_mark_grey(zval **pz TSRMLS_DC); -static int children_collect_white(zval **pz TSRMLS_DC); -static int children_scan(zval **pz TSRMLS_DC); - static void root_buffer_dtor(zend_gc_globals *gc_globals TSRMLS_DC) { if (gc_globals->buf) { @@ -272,18 +266,12 @@ ZEND_API void gc_remove_zval_from_buffer(zval *zv TSRMLS_DC) ((zval_gc_info*)zv)->u.buffered = NULL; } -static void zobj_scan_black(struct _store_object *obj, zval *pz TSRMLS_DC) -{ - GC_SET_BLACK(obj->buffered); - - if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && - Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { - zend_hash_apply(Z_OBJPROP_P(pz), (apply_func_t) children_scan_black TSRMLS_CC); - } -} - static void zval_scan_black(zval *pz TSRMLS_DC) { + Bucket *p; + +tail_call: + p = NULL; GC_ZVAL_SET_BLACK(pz); if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) { @@ -291,43 +279,61 @@ static void zval_scan_black(zval *pz TSRMLS_DC) obj->refcount++; if (GC_GET_COLOR(obj->buffered) != GC_BLACK) { - zobj_scan_black(obj, pz TSRMLS_CC); + GC_SET_BLACK(obj->buffered); + if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && + Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { + p = Z_OBJPROP_P(pz)->pListHead; + } } } else if (Z_TYPE_P(pz) == IS_ARRAY) { if (Z_ARRVAL_P(pz) != &EG(symbol_table)) { - zend_hash_apply(Z_ARRVAL_P(pz), (apply_func_t) children_scan_black TSRMLS_CC); + p = Z_ARRVAL_P(pz)->pListHead; } } -} - -static int children_scan_black(zval **pz TSRMLS_DC) -{ - if (Z_TYPE_PP(pz) != IS_ARRAY || Z_ARRVAL_PP(pz) != &EG(symbol_table)) { - (*pz)->refcount__gc++; - } - - if (GC_ZVAL_GET_COLOR(*pz) != GC_BLACK) { - zval_scan_black(*pz TSRMLS_CC); + while (p != NULL) { + pz = *(zval**)p->pData; + if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { + pz->refcount__gc++; + } + if (GC_ZVAL_GET_COLOR(pz) != GC_BLACK) { + if (p->pListNext == NULL) { + goto tail_call; + } else { + zval_scan_black(pz TSRMLS_CC); + } + } + p = p->pListNext; } - - return 0; } -static void zobj_mark_grey(struct _store_object *obj, zval *pz TSRMLS_DC) +static void zobj_scan_black(struct _store_object *obj, zval *pz TSRMLS_DC) { - if (GC_GET_COLOR(obj->buffered) != GC_GREY) { - GC_BENCH_INC(zobj_marked_grey); - GC_SET_COLOR(obj->buffered, GC_GREY); - if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && - Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { - zend_hash_apply(Z_OBJPROP_P(pz), (apply_func_t) children_mark_grey TSRMLS_CC); + Bucket *p; + + GC_SET_BLACK(obj->buffered); + if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && + Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { + p = Z_OBJPROP_P(pz)->pListHead; + while (p != NULL) { + pz = *(zval**)p->pData; + if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { + pz->refcount__gc++; + } + if (GC_ZVAL_GET_COLOR(pz) != GC_BLACK) { + zval_scan_black(pz TSRMLS_CC); + } + p = p->pListNext; } } } static void zval_mark_grey(zval *pz TSRMLS_DC) { + Bucket *p; + +tail_call: if (GC_ZVAL_GET_COLOR(pz) != GC_GREY) { + p = NULL; GC_BENCH_INC(zval_marked_grey); GC_ZVAL_SET_COLOR(pz, GC_GREY); @@ -335,24 +341,56 @@ static void zval_mark_grey(zval *pz TSRMLS_DC) struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; obj->refcount--; - zobj_mark_grey(obj, pz TSRMLS_CC); + if (GC_GET_COLOR(obj->buffered) != GC_GREY) { + GC_BENCH_INC(zobj_marked_grey); + GC_SET_COLOR(obj->buffered, GC_GREY); + if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && + Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { + p = Z_OBJPROP_P(pz)->pListHead; + } + } } else if (Z_TYPE_P(pz) == IS_ARRAY) { if (Z_ARRVAL_P(pz) == &EG(symbol_table)) { GC_ZVAL_SET_BLACK(pz); } else { - zend_hash_apply(Z_ARRVAL_P(pz), (apply_func_t) children_mark_grey TSRMLS_CC); + p = Z_ARRVAL_P(pz)->pListHead; + } + } + while (p != NULL) { + pz = *(zval**)p->pData; + if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { + pz->refcount__gc--; + } + if (p->pListNext == NULL) { + goto tail_call; + } else { + zval_mark_grey(pz TSRMLS_CC); } + p = p->pListNext; } } } -static int children_mark_grey(zval **pz TSRMLS_DC) +static void zobj_mark_grey(struct _store_object *obj, zval *pz TSRMLS_DC) { - if (Z_TYPE_PP(pz) != IS_ARRAY || Z_ARRVAL_PP(pz) != &EG(symbol_table)) { - (*pz)->refcount__gc--; + Bucket *p; + + if (GC_GET_COLOR(obj->buffered) != GC_GREY) { + GC_BENCH_INC(zobj_marked_grey); + GC_SET_COLOR(obj->buffered, GC_GREY); + if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && + Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { + p = Z_OBJPROP_P(pz)->pListHead; + while (p != NULL) { + pz = *(zval**)p->pData; + if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { + pz->refcount__gc--; + } + zval_mark_grey(pz TSRMLS_CC); + p = p->pListNext; + } + } } - zval_mark_grey(*pz TSRMLS_CC); - return 0; } static void gc_mark_roots(TSRMLS_D) @@ -386,50 +424,75 @@ static void gc_mark_roots(TSRMLS_D) } } -static void zobj_scan(zval *pz TSRMLS_DC) -{ - if (EG(objects_store).object_buckets) { - struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; - - if (GC_GET_COLOR(obj->buffered) == GC_GREY) { - if (obj->refcount > 0) { - zobj_scan_black(obj, pz TSRMLS_CC); - } else { - GC_SET_COLOR(obj->buffered, GC_WHITE); - if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && - Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { - zend_hash_apply(Z_OBJPROP_P(pz), (apply_func_t) children_scan TSRMLS_CC); - } - } - } - } -} - static int zval_scan(zval *pz TSRMLS_DC) { + Bucket *p; + +tail_call: if (GC_ZVAL_GET_COLOR(pz) == GC_GREY) { + p = NULL; if (pz->refcount__gc > 0) { zval_scan_black(pz TSRMLS_CC); } else { GC_ZVAL_SET_COLOR(pz, GC_WHITE); - if (Z_TYPE_P(pz) == IS_OBJECT) { - zobj_scan(pz TSRMLS_CC); + if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) { + struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; + + if (GC_GET_COLOR(obj->buffered) == GC_GREY) { + if (obj->refcount > 0) { + zobj_scan_black(obj, pz TSRMLS_CC); + } else { + GC_SET_COLOR(obj->buffered, GC_WHITE); + if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && + Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { + p = Z_OBJPROP_P(pz)->pListHead; + } + } + } } else if (Z_TYPE_P(pz) == IS_ARRAY) { if (Z_ARRVAL_P(pz) == &EG(symbol_table)) { GC_ZVAL_SET_BLACK(pz); } else { - zend_hash_apply(Z_ARRVAL_P(pz), (apply_func_t) children_scan TSRMLS_CC); + p = Z_ARRVAL_P(pz)->pListHead; } } } + while (p != NULL) { + if (p->pListNext == NULL) { + pz = *(zval**)p->pData; + goto tail_call; + } else { + zval_scan(*(zval**)p->pData TSRMLS_CC); + } + p = p->pListNext; + } } return 0; } -static int children_scan(zval **pz TSRMLS_DC) +static void zobj_scan(zval *pz TSRMLS_DC) { - zval_scan(*pz TSRMLS_CC); - return 0; + Bucket *p; + + if (EG(objects_store).object_buckets) { + struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; + + if (GC_GET_COLOR(obj->buffered) == GC_GREY) { + if (obj->refcount > 0) { + zobj_scan_black(obj, pz TSRMLS_CC); + } else { + GC_SET_COLOR(obj->buffered, GC_WHITE); + if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && + Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { + p = Z_OBJPROP_P(pz)->pListHead; + while (p != NULL) { + zval_scan(*(zval**)p->pData TSRMLS_CC); + p = p->pListNext; + } + } + } + } + } } static void gc_scan_roots(TSRMLS_D) @@ -451,33 +514,29 @@ static void gc_scan_roots(TSRMLS_D) } } -static void zobj_collect_white(zval *pz TSRMLS_DC) -{ - if (EG(objects_store).object_buckets) { - zend_object_handle handle = Z_OBJ_HANDLE_P(pz); - struct _store_object *obj = &EG(objects_store).object_buckets[handle].bucket.obj; - - if (obj->buffered == (gc_root_buffer*)GC_WHITE) { - GC_SET_BLACK(obj->buffered); - - if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && - Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { - zend_hash_apply(Z_OBJPROP_P(pz), (apply_func_t) children_collect_white TSRMLS_CC); - } - } - } -} - static void zval_collect_white(zval *pz TSRMLS_DC) { + Bucket *p; + +tail_call: if (((zval_gc_info*)(pz))->u.buffered == (gc_root_buffer*)GC_WHITE) { + p = NULL; GC_ZVAL_SET_BLACK(pz); - if (Z_TYPE_P(pz) == IS_OBJECT) { - zobj_collect_white(pz TSRMLS_CC); + if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) { + struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; + + if (obj->buffered == (gc_root_buffer*)GC_WHITE) { + GC_SET_BLACK(obj->buffered); + + if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && + Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { + p = Z_OBJPROP_P(pz)->pListHead; + } + } } else { if (Z_TYPE_P(pz) == IS_ARRAY) { - zend_hash_apply(Z_ARRVAL_P(pz), (apply_func_t) children_collect_white TSRMLS_CC); + p = Z_ARRVAL_P(pz)->pListHead; } } @@ -485,16 +544,46 @@ static void zval_collect_white(zval *pz TSRMLS_DC) pz->refcount__gc++; ((zval_gc_info*)pz)->u.next = GC_G(zval_to_free); GC_G(zval_to_free) = (zval_gc_info*)pz; + + while (p != NULL) { + pz = *(zval**)p->pData; + if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { + pz->refcount__gc++; + } + if (p->pListNext == NULL) { + goto tail_call; + } else { + zval_collect_white(pz TSRMLS_CC); + } + p = p->pListNext; + } } } -static int children_collect_white(zval **pz TSRMLS_DC) +static void zobj_collect_white(zval *pz TSRMLS_DC) { - if (Z_TYPE_PP(pz) != IS_ARRAY || Z_ARRVAL_PP(pz) != &EG(symbol_table)) { - (*pz)->refcount__gc++; + Bucket *p; + + if (EG(objects_store).object_buckets) { + struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; + + if (obj->buffered == (gc_root_buffer*)GC_WHITE) { + GC_SET_BLACK(obj->buffered); + + if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && + Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) { + p = Z_OBJPROP_P(pz)->pListHead; + while (p != NULL) { + pz = *(zval**)p->pData; + if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { + pz->refcount__gc++; + } + zval_collect_white(pz TSRMLS_CC); + p = p->pListNext; + } + } + } } - zval_collect_white(*pz TSRMLS_CC); - return 0; } static void gc_collect_roots(TSRMLS_D) diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 2fa423a0c..efda0010a 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_globals.h,v 1.141.2.3.2.7.2.23 2009/03/18 10:18:09 dmitry Exp $ */ +/* $Id: zend_globals.h,v 1.141.2.3.2.7.2.24 2009/03/25 15:23:17 dmitry Exp $ */ #ifndef ZEND_GLOBALS_H #define ZEND_GLOBALS_H @@ -292,8 +292,6 @@ struct _zend_php_scanner_globals { int yy_state; zend_stack state_stack; - zend_llist used_state_stacks; - #ifdef ZEND_MULTIBYTE /* original (unfiltered) script */ unsigned char *script_org; diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 5a7a389a9..ba2b8312f 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_hash.c,v 1.121.2.4.2.8.2.8 2008/12/31 11:15:32 sebastian Exp $ */ +/* $Id: zend_hash.c,v 1.121.2.4.2.8.2.9 2009/06/07 19:28:15 mattwil Exp $ */ #include "zend.h" @@ -376,7 +376,7 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void UPDATE_DATA(ht, p, pData, nDataSize); HANDLE_UNBLOCK_INTERRUPTIONS(); if ((long)h >= (long)ht->nNextFreeElement) { - ht->nNextFreeElement = h + 1; + ht->nNextFreeElement = h < LONG_MAX ? h + 1 : LONG_MAX; } if (pDest) { *pDest = p->pData; @@ -404,7 +404,7 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void HANDLE_UNBLOCK_INTERRUPTIONS(); if ((long)h >= (long)ht->nNextFreeElement) { - ht->nNextFreeElement = h + 1; + ht->nNextFreeElement = h < LONG_MAX ? h + 1 : LONG_MAX; } ht->nNumOfElements++; ZEND_HASH_IF_FULL_DO_RESIZE(ht); diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 90b4535b2..8575f6bc5 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_hash.h,v 1.78.2.2.2.2.2.11 2009/03/19 15:16:10 dmitry Exp $ */ +/* $Id: zend_hash.h,v 1.78.2.2.2.2.2.13 2009/05/25 01:18:00 pollita Exp $ */ #ifndef ZEND_HASH_H #define ZEND_HASH_H @@ -314,47 +314,29 @@ END_EXTERN_C() const char *end = key + length - 1; \ long idx; \ \ - if (*end != '\0') { /* not a null terminated string */ \ + if ((*end != '\0') /* not a null terminated string */ \ + || (*tmp == '0' && length > 2) /* numbers with leading zeros */ \ + || (end - tmp > MAX_LENGTH_OF_LONG - 1) /* number too long */ \ + || (SIZEOF_LONG == 4 && \ + end - tmp == MAX_LENGTH_OF_LONG - 1 && \ + *tmp > '2')) { /* overflow */ \ break; \ - } else if (*tmp == '0') { \ - if (end - tmp != 1) { \ - /* don't accept numbers with leading zeros */ \ - break; \ - } \ - idx = 0; \ - } else if (end - tmp > MAX_LENGTH_OF_LONG - 1) { \ - /* don't accept too long strings */ \ - break; \ - } else { \ - if (end - tmp == MAX_LENGTH_OF_LONG - 1) { \ - end--; /* check overflow in last digit later */ \ - } \ - idx = (*tmp++ - '0'); \ - while (tmp != end && *tmp >= '0' && *tmp <= '9') { \ - idx = (idx * 10) + (*tmp++ - '0'); \ - } \ - if (tmp != end) { \ - break; \ - } \ - if (end != key + length - 1) { \ - /* last digit can cause overflow */ \ - if (*tmp < '0' || *tmp > '9' || idx > LONG_MAX / 10) { \ - break; \ - } \ - idx = (idx * 10) + (*tmp - '0'); \ - if (*key == '-') { \ - idx = -idx; \ - if (idx > 0) { /* overflow */ \ - break; \ - } \ - } else if (idx < 0) { /* overflow */ \ + } \ + idx = (*tmp - '0'); \ + while (++tmp != end && *tmp >= '0' && *tmp <= '9') { \ + idx = (idx * 10) + (*tmp - '0'); \ + } \ + if (tmp == end) { \ + if (*key == '-') { \ + idx = -idx; \ + if (idx > 0) { /* overflow */ \ break; \ } \ - } else if (*key == '-') { \ - idx = -idx; \ + } else if (idx < 0) { /* overflow */ \ + break; \ } \ + return func; \ } \ - return func; \ } \ } while (0) @@ -385,11 +367,14 @@ static inline int zend_symtable_exists(HashTable *ht, const char *arKey, uint nK return zend_hash_exists(ht, arKey, nKeyLength); } -static inline int zend_symtable_update_current_key(HashTable *ht, const char *arKey, uint nKeyLength, int mode) +static inline int zend_symtable_update_current_key_ex(HashTable *ht, const char *arKey, uint nKeyLength, int mode, HashPosition *pos) { - ZEND_HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_update_current_key_ex(ht, HASH_KEY_IS_LONG, NULL, 0, idx, mode, NULL)); - return zend_hash_update_current_key_ex(ht, HASH_KEY_IS_STRING, arKey, nKeyLength, 0, mode, NULL); + ZEND_HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_update_current_key_ex(ht, HASH_KEY_IS_LONG, NULL, 0, idx, mode, pos)); + return zend_hash_update_current_key_ex(ht, HASH_KEY_IS_STRING, arKey, nKeyLength, 0, mode, pos); } +#define zend_symtable_update_current_key(ht,arKey,nKeyLength,mode) \ + zend_symtable_update_current_key_ex(ht, arKey, nKeyLength, mode, NULL) + #endif /* ZEND_HASH_H */ diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c index 83b2d1381..b2f2c2a43 100644 --- a/Zend/zend_highlight.c +++ b/Zend/zend_highlight.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_highlight.c,v 1.49.2.3.2.2.2.6 2008/12/31 11:15:32 sebastian Exp $ */ +/* $Id: zend_highlight.c,v 1.49.2.3.2.2.2.7 2009/05/05 01:35:44 mattwil Exp $ */ #include "zend.h" #include @@ -142,14 +142,8 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini zend_printf("", last_color); } } - switch (token_type) { - case T_END_HEREDOC: - zend_html_puts(token.value.str.val, token.value.str.len TSRMLS_CC); - break; - default: - zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); - break; - } + + zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); if (token.type == IS_STRING) { switch (token_type) { @@ -170,19 +164,6 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini token.type = 0; } - /* handler for trailing comments, see bug #42767 */ - if (LANG_SCNG(yy_leng) && LANG_SCNG(yy_text) < LANG_SCNG(yy_limit)) { - if (last_color != syntax_highlighter_ini->highlight_comment) { - if (last_color != syntax_highlighter_ini->highlight_html) { - zend_printf(""); - } - if (syntax_highlighter_ini->highlight_comment != syntax_highlighter_ini->highlight_html) { - zend_printf("", syntax_highlighter_ini->highlight_comment); - } - } - zend_html_puts(LANG_SCNG(yy_text), (LANG_SCNG(yy_limit) - LANG_SCNG(yy_text)) TSRMLS_CC); - } - if (last_color != syntax_highlighter_ini->highlight_html) { zend_printf("\n"); } diff --git a/Zend/zend_ini_scanner.c b/Zend/zend_ini_scanner.c index 9f0a3b40f..f5cd73138 100644 --- a/Zend/zend_ini_scanner.c +++ b/Zend/zend_ini_scanner.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.6.dev on Mon Feb 2 19:23:18 2009 */ +/* Generated by re2c 0.13.5 on Tue May 19 08:53:54 2009 */ #line 1 "Zend/zend_ini_scanner.l" /* +----------------------------------------------------------------------+ @@ -22,7 +22,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_scanner.c,v 1.1.2.17 2009/02/14 21:20:14 rasmus Exp $ */ +/* $Id: zend_ini_scanner.c,v 1.1.2.18 2009/05/19 15:59:36 shire Exp $ */ #include #include "zend.h" @@ -339,21 +339,21 @@ yyc_INITIAL: { static const unsigned char yybm[] = { 128, 128, 128, 128, 128, 128, 128, 128, - 128, 192, 0, 128, 128, 0, 128, 128, + 128, 160, 0, 128, 128, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 192, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 160, 128, 128, 160, 160, 128, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 128, 128, 128, 128, 128, 128, - 128, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 128, 128, 128, 128, 160, - 128, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 128, 128, 128, 128, 128, + 160, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 192, 128, 128, 192, 192, 128, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 128, 128, 128, 128, 128, 128, + 128, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 128, 128, 128, 128, 192, + 128, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, @@ -371,7 +371,8 @@ yyc_INITIAL: 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, }; - YYDEBUG(1, *YYCURSOR); + + YYDEBUG(0, *YYCURSOR); YYFILL(6); yych = *YYCURSOR; YYDEBUG(-1, yych); @@ -388,11 +389,8 @@ yyc_INITIAL: case '\'': case '(': case ')': - case '*': case '+': case ',': - case '-': - case '.': case '/': case ':': case '<': @@ -406,6 +404,9 @@ yyc_INITIAL: case '}': case '~': goto yy10; case '#': goto yy12; + case '*': + case '-': + case '.': goto yy13; case '0': case '1': case '2': @@ -458,7 +459,7 @@ yyc_INITIAL: case 'v': case 'w': case 'x': - case 'z': goto yy13; + case 'z': goto yy14; case ';': goto yy15; case '=': goto yy16; case 'F': @@ -474,6 +475,14 @@ yyc_INITIAL: case '[': goto yy23; default: goto yy3; } +yy2: + YYDEBUG(2, *YYCURSOR); + yyleng = YYCURSOR - SCNG(yy_text); +#line 389 "Zend/zend_ini_scanner.l" + { /* Get option name */ + RETURN_TOKEN(TC_LABEL, yytext, yyleng); +} +#line 486 "Zend/zend_ini_scanner.c" yy3: YYDEBUG(3, *YYCURSOR); ++YYCURSOR; @@ -483,7 +492,7 @@ yy3: { return 0; } -#line 487 "Zend/zend_ini_scanner.c" +#line 496 "Zend/zend_ini_scanner.c" yy5: YYDEBUG(5, *YYCURSOR); yyaccept = 0; @@ -497,7 +506,7 @@ yy6: /* eat whitespace */ goto restart; } -#line 501 "Zend/zend_ini_scanner.c" +#line 510 "Zend/zend_ini_scanner.c" yy7: YYDEBUG(7, *YYCURSOR); ++YYCURSOR; @@ -509,7 +518,7 @@ yy8: SCNG(lineno)++; return END_OF_LINE; } -#line 513 "Zend/zend_ini_scanner.c" +#line 522 "Zend/zend_ini_scanner.c" yy9: YYDEBUG(9, *YYCURSOR); yych = *++YYCURSOR; @@ -524,7 +533,7 @@ yy10: { /* Disallow these chars outside option values */ return yytext[0]; } -#line 528 "Zend/zend_ini_scanner.c" +#line 537 "Zend/zend_ini_scanner.c" yy12: YYDEBUG(12, *YYCURSOR); yyaccept = 1; @@ -532,17 +541,12 @@ yy12: goto yy57; yy13: YYDEBUG(13, *YYCURSOR); - ++YYCURSOR; - yych = *YYCURSOR; - goto yy26; + yych = *++YYCURSOR; + goto yy29; yy14: YYDEBUG(14, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 389 "Zend/zend_ini_scanner.l" - { /* Get option name */ - RETURN_TOKEN(TC_LABEL, yytext, yyleng); -} -#line 546 "Zend/zend_ini_scanner.c" + yych = *++YYCURSOR; + goto yy29; yy15: YYDEBUG(15, *YYCURSOR); yyaccept = 1; @@ -565,27 +569,27 @@ yy17: } return '='; } -#line 569 "Zend/zend_ini_scanner.c" +#line 573 "Zend/zend_ini_scanner.c" yy18: YYDEBUG(18, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'A') goto yy46; if (yych == 'a') goto yy46; - goto yy26; + goto yy29; yy19: YYDEBUG(19, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych == 'O') goto yy42; - if (yych <= 'T') goto yy26; + if (yych <= 'T') goto yy29; goto yy43; } else { if (yych <= 'o') { - if (yych <= 'n') goto yy26; + if (yych <= 'n') goto yy29; goto yy42; } else { if (yych == 'u') goto yy43; - goto yy26; + goto yy29; } } yy20: @@ -593,15 +597,15 @@ yy20: yych = *++YYCURSOR; if (yych <= 'N') { if (yych == 'F') goto yy37; - if (yych <= 'M') goto yy26; + if (yych <= 'M') goto yy29; goto yy31; } else { if (yych <= 'f') { - if (yych <= 'e') goto yy26; + if (yych <= 'e') goto yy29; goto yy37; } else { if (yych == 'n') goto yy31; - goto yy26; + goto yy29; } } yy21: @@ -609,16 +613,19 @@ yy21: yych = *++YYCURSOR; if (yych == 'R') goto yy35; if (yych == 'r') goto yy35; - goto yy26; + goto yy29; yy22: YYDEBUG(22, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy27; - if (yych == 'e') goto yy27; - goto yy26; + if (yych == 'E') goto yy30; + if (yych == 'e') goto yy30; + goto yy29; yy23: YYDEBUG(23, *YYCURSOR); ++YYCURSOR; + if (yybm[0+(yych = *YYCURSOR)] & 32) { + goto yy25; + } YYDEBUG(24, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); #line 327 "Zend/zend_ini_scanner.l" @@ -631,35 +638,17 @@ yy23: } return TC_SECTION; } -#line 635 "Zend/zend_ini_scanner.c" +#line 642 "Zend/zend_ini_scanner.c" yy25: YYDEBUG(25, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; -yy26: YYDEBUG(26, *YYCURSOR); if (yybm[0+yych] & 32) { goto yy25; } - if (yych == '[') goto yy28; - goto yy14; -yy27: YYDEBUG(27, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy31; - if (yych == 's') goto yy31; - goto yy26; -yy28: - YYDEBUG(28, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(29, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy28; - } - YYDEBUG(30, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); #line 352 "Zend/zend_ini_scanner.l" { /* Start of option with offset */ @@ -671,14 +660,31 @@ yy28: RETURN_TOKEN(TC_OFFSET, yytext, yyleng); } -#line 675 "Zend/zend_ini_scanner.c" +#line 664 "Zend/zend_ini_scanner.c" +yy28: + YYDEBUG(28, *YYCURSOR); + ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; +yy29: + YYDEBUG(29, *YYCURSOR); + if (yybm[0+yych] & 64) { + goto yy28; + } + if (yych == '[') goto yy25; + goto yy2; +yy30: + YYDEBUG(30, *YYCURSOR); + yych = *++YYCURSOR; + if (yych == 'S') goto yy31; + if (yych != 's') goto yy29; yy31: YYDEBUG(31, *YYCURSOR); ++YYCURSOR; - if (yybm[0+(yych = *YYCURSOR)] & 32) { - goto yy25; + if (yybm[0+(yych = *YYCURSOR)] & 64) { + goto yy28; } - if (yych == '[') goto yy28; + if (yych == '[') goto yy25; goto yy34; yy32: YYDEBUG(32, *YYCURSOR); @@ -687,7 +693,7 @@ yy32: { /* TRUE value (when used outside option value/offset this causes parse error!) */ RETURN_TOKEN(BOOL_TRUE, "1", 1); } -#line 691 "Zend/zend_ini_scanner.c" +#line 697 "Zend/zend_ini_scanner.c" yy33: YYDEBUG(33, *YYCURSOR); ++YYCURSOR; @@ -702,25 +708,25 @@ yy35: YYDEBUG(35, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'U') goto yy36; - if (yych != 'u') goto yy26; + if (yych != 'u') goto yy29; yy36: YYDEBUG(36, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'E') goto yy31; if (yych == 'e') goto yy31; - goto yy26; + goto yy29; yy37: YYDEBUG(37, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'F') goto yy38; - if (yych != 'f') goto yy26; + if (yych != 'f') goto yy29; yy38: YYDEBUG(38, *YYCURSOR); ++YYCURSOR; - if (yybm[0+(yych = *YYCURSOR)] & 32) { - goto yy25; + if (yybm[0+(yych = *YYCURSOR)] & 64) { + goto yy28; } - if (yych == '[') goto yy28; + if (yych == '[') goto yy25; goto yy41; yy39: YYDEBUG(39, *YYCURSOR); @@ -729,7 +735,7 @@ yy39: { /* FALSE value (when used outside option value/offset this causes parse error!)*/ RETURN_TOKEN(BOOL_FALSE, "", 0); } -#line 733 "Zend/zend_ini_scanner.c" +#line 739 "Zend/zend_ini_scanner.c" yy40: YYDEBUG(40, *YYCURSOR); ++YYCURSOR; @@ -745,32 +751,32 @@ yy42: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= '.') { - if (yych == '*') goto yy25; + if (yych == '*') goto yy28; if (yych <= ',') goto yy41; - goto yy25; + goto yy28; } else { if (yych <= '9') { if (yych <= '/') goto yy41; - goto yy25; + goto yy28; } else { if (yych <= '@') goto yy41; - if (yych <= 'M') goto yy25; + if (yych <= 'M') goto yy28; goto yy45; } } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy25; - if (yych <= '[') goto yy28; + if (yych <= 'Z') goto yy28; + if (yych <= '[') goto yy25; if (yych <= '^') goto yy41; - goto yy25; + goto yy28; } else { if (yych <= 'm') { if (yych <= '`') goto yy41; - goto yy25; + goto yy28; } else { if (yych <= 'n') goto yy45; - if (yych <= 'z') goto yy25; + if (yych <= 'z') goto yy28; goto yy41; } } @@ -779,35 +785,35 @@ yy43: YYDEBUG(43, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'L') goto yy44; - if (yych != 'l') goto yy26; + if (yych != 'l') goto yy29; yy44: YYDEBUG(44, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'L') goto yy38; if (yych == 'l') goto yy38; - goto yy26; + goto yy29; yy45: YYDEBUG(45, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'E') goto yy38; if (yych == 'e') goto yy38; - goto yy26; + goto yy29; yy46: YYDEBUG(46, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'L') goto yy47; - if (yych != 'l') goto yy26; + if (yych != 'l') goto yy29; yy47: YYDEBUG(47, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'S') goto yy48; - if (yych != 's') goto yy26; + if (yych != 's') goto yy29; yy48: YYDEBUG(48, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'E') goto yy38; if (yych == 'e') goto yy38; - goto yy26; + goto yy29; yy49: YYDEBUG(49, *YYCURSOR); ++YYCURSOR; @@ -841,7 +847,7 @@ yy54: SCNG(lineno)++; return END_OF_LINE; } -#line 845 "Zend/zend_ini_scanner.c" +#line 851 "Zend/zend_ini_scanner.c" yy55: YYDEBUG(55, *YYCURSOR); yych = *++YYCURSOR; @@ -870,7 +876,7 @@ yy59: SCNG(lineno)++; return END_OF_LINE; } -#line 874 "Zend/zend_ini_scanner.c" +#line 880 "Zend/zend_ini_scanner.c" yy60: YYDEBUG(60, *YYCURSOR); yych = *++YYCURSOR; @@ -976,7 +982,7 @@ yy68: zend_ini_escape_string(ini_lval, yytext, yyleng, '"' TSRMLS_CC); return TC_QUOTED_STRING; } -#line 980 "Zend/zend_ini_scanner.c" +#line 986 "Zend/zend_ini_scanner.c" yy69: YYDEBUG(69, *YYCURSOR); ++YYCURSOR; @@ -990,7 +996,7 @@ yy70: yy_pop_state(TSRMLS_C); return '"'; } -#line 994 "Zend/zend_ini_scanner.c" +#line 1000 "Zend/zend_ini_scanner.c" yy71: YYDEBUG(71, *YYCURSOR); ++YYCURSOR; @@ -1009,7 +1015,7 @@ yy72: { return 0; } -#line 1013 "Zend/zend_ini_scanner.c" +#line 1019 "Zend/zend_ini_scanner.c" yy73: YYDEBUG(73, *YYCURSOR); yyaccept = 1; @@ -1022,7 +1028,7 @@ yy73: yy75: YYDEBUG(75, *YYCURSOR); YYCURSOR = YYMARKER; - if (yyaccept == 0) { + if (yyaccept <= 0) { goto yy68; } else { goto yy72; @@ -1130,7 +1136,7 @@ yy88: yy_push_state(ST_VARNAME TSRMLS_CC); return TC_DOLLAR_CURLY; } -#line 1134 "Zend/zend_ini_scanner.c" +#line 1140 "Zend/zend_ini_scanner.c" yy90: YYDEBUG(90, *YYCURSOR); ++YYCURSOR; @@ -1233,7 +1239,7 @@ yy95: { /* Get rest as section/offset value */ RETURN_TOKEN(TC_STRING, yytext, yyleng); } -#line 1237 "Zend/zend_ini_scanner.c" +#line 1243 "Zend/zend_ini_scanner.c" yy96: YYDEBUG(96, *YYCURSOR); yyaccept = 0; @@ -1254,7 +1260,7 @@ yy98: { return 0; } -#line 1258 "Zend/zend_ini_scanner.c" +#line 1264 "Zend/zend_ini_scanner.c" yy99: YYDEBUG(99, *YYCURSOR); ++YYCURSOR; @@ -1266,7 +1272,7 @@ yy100: yy_push_state(ST_DOUBLE_QUOTES TSRMLS_CC); return '"'; } -#line 1270 "Zend/zend_ini_scanner.c" +#line 1276 "Zend/zend_ini_scanner.c" yy101: YYDEBUG(101, *YYCURSOR); yych = *++YYCURSOR; @@ -1332,7 +1338,7 @@ yy106: { /* Get number option value as string */ RETURN_TOKEN(TC_NUMBER, yytext, yyleng); } -#line 1336 "Zend/zend_ini_scanner.c" +#line 1342 "Zend/zend_ini_scanner.c" yy107: YYDEBUG(107, *YYCURSOR); yyaccept = 3; @@ -1362,7 +1368,7 @@ yy108: { /* Get constant option value */ RETURN_TOKEN(TC_CONSTANT, yytext, yyleng); } -#line 1366 "Zend/zend_ini_scanner.c" +#line 1372 "Zend/zend_ini_scanner.c" yy109: YYDEBUG(109, *YYCURSOR); yych = *++YYCURSOR; @@ -1378,7 +1384,7 @@ yy111: BEGIN(INITIAL); return ']'; } -#line 1382 "Zend/zend_ini_scanner.c" +#line 1388 "Zend/zend_ini_scanner.c" yy112: YYDEBUG(112, *YYCURSOR); yyaccept = 0; @@ -1414,13 +1420,13 @@ yy116: YYDEBUG(116, *YYCURSOR); YYCURSOR = YYMARKER; if (yyaccept <= 1) { - if (yyaccept == 0) { + if (yyaccept <= 0) { goto yy95; } else { goto yy98; } } else { - if (yyaccept == 2) { + if (yyaccept <= 2) { goto yy106; } else { goto yy108; @@ -1677,7 +1683,7 @@ yy133: } RETURN_TOKEN(TC_RAW, yytext, yyleng); } -#line 1681 "Zend/zend_ini_scanner.c" +#line 1687 "Zend/zend_ini_scanner.c" yy137: YYDEBUG(137, *YYCURSOR); ++YYCURSOR; @@ -1688,7 +1694,7 @@ yy137: yy_push_state(ST_VARNAME TSRMLS_CC); return TC_DOLLAR_CURLY; } -#line 1692 "Zend/zend_ini_scanner.c" +#line 1698 "Zend/zend_ini_scanner.c" yy139: YYDEBUG(139, *YYCURSOR); yyaccept = 0; @@ -1804,7 +1810,7 @@ yy146: } RETURN_TOKEN(TC_RAW, yytext, yyleng); } -#line 1808 "Zend/zend_ini_scanner.c" +#line 1814 "Zend/zend_ini_scanner.c" yy147: YYDEBUG(147, *YYCURSOR); yyaccept = 0; @@ -1832,7 +1838,7 @@ yy149: SCNG(lineno)++; return END_OF_LINE; } -#line 1836 "Zend/zend_ini_scanner.c" +#line 1842 "Zend/zend_ini_scanner.c" yy150: YYDEBUG(150, *YYCURSOR); yych = *++YYCURSOR; @@ -1851,7 +1857,7 @@ yy152: BEGIN(INITIAL); return END_OF_LINE; } -#line 1855 "Zend/zend_ini_scanner.c" +#line 1861 "Zend/zend_ini_scanner.c" yy153: YYDEBUG(153, *YYCURSOR); yych = *++YYCURSOR; @@ -1879,7 +1885,7 @@ yy157: SCNG(lineno)++; return END_OF_LINE; } -#line 1883 "Zend/zend_ini_scanner.c" +#line 1889 "Zend/zend_ini_scanner.c" yy158: YYDEBUG(158, *YYCURSOR); yych = *++YYCURSOR; @@ -1985,7 +1991,7 @@ yy168: { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */ RETURN_TOKEN(TC_RAW, yytext, yyleng); } -#line 1989 "Zend/zend_ini_scanner.c" +#line 1995 "Zend/zend_ini_scanner.c" yy169: YYDEBUG(169, *YYCURSOR); ++YYCURSOR; @@ -1995,7 +2001,7 @@ yy169: { return 0; } -#line 1999 "Zend/zend_ini_scanner.c" +#line 2005 "Zend/zend_ini_scanner.c" yy171: YYDEBUG(171, *YYCURSOR); ++YYCURSOR; @@ -2010,7 +2016,7 @@ yy172: SCNG(lineno)++; return ']'; } -#line 2014 "Zend/zend_ini_scanner.c" +#line 2020 "Zend/zend_ini_scanner.c" yy173: YYDEBUG(173, *YYCURSOR); ++YYCURSOR; @@ -2135,7 +2141,7 @@ yy182: { /* Get rest as section/offset value */ RETURN_TOKEN(TC_STRING, yytext, yyleng); } -#line 2139 "Zend/zend_ini_scanner.c" +#line 2145 "Zend/zend_ini_scanner.c" yy183: YYDEBUG(183, *YYCURSOR); yyaccept = 0; @@ -2158,7 +2164,7 @@ yy185: { return 0; } -#line 2162 "Zend/zend_ini_scanner.c" +#line 2168 "Zend/zend_ini_scanner.c" yy186: YYDEBUG(186, *YYCURSOR); ++YYCURSOR; @@ -2170,7 +2176,7 @@ yy187: yy_push_state(ST_DOUBLE_QUOTES TSRMLS_CC); return '"'; } -#line 2174 "Zend/zend_ini_scanner.c" +#line 2180 "Zend/zend_ini_scanner.c" yy188: YYDEBUG(188, *YYCURSOR); yych = *++YYCURSOR; @@ -2236,7 +2242,7 @@ yy193: { /* Get number option value as string */ RETURN_TOKEN(TC_NUMBER, yytext, yyleng); } -#line 2240 "Zend/zend_ini_scanner.c" +#line 2246 "Zend/zend_ini_scanner.c" yy194: YYDEBUG(194, *YYCURSOR); yyaccept = 3; @@ -2266,7 +2272,7 @@ yy195: { /* Get constant option value */ RETURN_TOKEN(TC_CONSTANT, yytext, yyleng); } -#line 2270 "Zend/zend_ini_scanner.c" +#line 2276 "Zend/zend_ini_scanner.c" yy196: YYDEBUG(196, *YYCURSOR); yych = *++YYCURSOR; @@ -2285,7 +2291,7 @@ yy198: SCNG(lineno)++; return ']'; } -#line 2289 "Zend/zend_ini_scanner.c" +#line 2295 "Zend/zend_ini_scanner.c" yy199: YYDEBUG(199, *YYCURSOR); ++YYCURSOR; @@ -2343,13 +2349,13 @@ yy207: YYDEBUG(207, *YYCURSOR); YYCURSOR = YYMARKER; if (yyaccept <= 1) { - if (yyaccept == 0) { + if (yyaccept <= 0) { goto yy182; } else { goto yy185; } } else { - if (yyaccept == 2) { + if (yyaccept <= 2) { goto yy193; } else { goto yy195; @@ -2606,7 +2612,7 @@ yy224: } RETURN_TOKEN(TC_RAW, yytext, yyleng); } -#line 2610 "Zend/zend_ini_scanner.c" +#line 2616 "Zend/zend_ini_scanner.c" yy228: YYDEBUG(228, *YYCURSOR); ++YYCURSOR; @@ -2617,7 +2623,7 @@ yy228: yy_push_state(ST_VARNAME TSRMLS_CC); return TC_DOLLAR_CURLY; } -#line 2621 "Zend/zend_ini_scanner.c" +#line 2627 "Zend/zend_ini_scanner.c" yy230: YYDEBUG(230, *YYCURSOR); yyaccept = 0; @@ -2801,7 +2807,7 @@ yy236: BEGIN(INITIAL); return END_OF_LINE; } -#line 2805 "Zend/zend_ini_scanner.c" +#line 2811 "Zend/zend_ini_scanner.c" yy237: YYDEBUG(237, *YYCURSOR); yyaccept = 0; @@ -2814,7 +2820,7 @@ yy238: { /* Get everything else as option/offset value */ RETURN_TOKEN(TC_STRING, yytext, yyleng); } -#line 2818 "Zend/zend_ini_scanner.c" +#line 2824 "Zend/zend_ini_scanner.c" yy239: YYDEBUG(239, *YYCURSOR); yyaccept = 1; @@ -2827,7 +2833,7 @@ yy240: { RETURN_TOKEN(TC_WHITESPACE, yytext, yyleng); } -#line 2831 "Zend/zend_ini_scanner.c" +#line 2837 "Zend/zend_ini_scanner.c" yy241: YYDEBUG(241, *YYCURSOR); ++YYCURSOR; @@ -2840,7 +2846,7 @@ yy242: SCNG(lineno)++; return END_OF_LINE; } -#line 2844 "Zend/zend_ini_scanner.c" +#line 2850 "Zend/zend_ini_scanner.c" yy243: YYDEBUG(243, *YYCURSOR); yych = *++YYCURSOR; @@ -2858,7 +2864,7 @@ yy245: { /* Boolean operators */ return yytext[0]; } -#line 2862 "Zend/zend_ini_scanner.c" +#line 2868 "Zend/zend_ini_scanner.c" yy246: YYDEBUG(246, *YYCURSOR); ++YYCURSOR; @@ -2870,7 +2876,7 @@ yy247: yy_push_state(ST_DOUBLE_QUOTES TSRMLS_CC); return '"'; } -#line 2874 "Zend/zend_ini_scanner.c" +#line 2880 "Zend/zend_ini_scanner.c" yy248: YYDEBUG(248, *YYCURSOR); yych = *++YYCURSOR; @@ -2950,7 +2956,7 @@ yy253: { /* Get number option value as string */ RETURN_TOKEN(TC_NUMBER, yytext, yyleng); } -#line 2954 "Zend/zend_ini_scanner.c" +#line 2960 "Zend/zend_ini_scanner.c" yy254: YYDEBUG(254, *YYCURSOR); yyaccept = 2; @@ -2967,7 +2973,7 @@ yy255: BEGIN(INITIAL); return END_OF_LINE; } -#line 2971 "Zend/zend_ini_scanner.c" +#line 2977 "Zend/zend_ini_scanner.c" yy257: YYDEBUG(257, *YYCURSOR); yyaccept = 4; @@ -3007,7 +3013,7 @@ yy258: { /* Get constant option value */ RETURN_TOKEN(TC_CONSTANT, yytext, yyleng); } -#line 3011 "Zend/zend_ini_scanner.c" +#line 3017 "Zend/zend_ini_scanner.c" yy259: YYDEBUG(259, *YYCURSOR); yyaccept = 4; @@ -3407,13 +3413,13 @@ yy270: YYCURSOR = YYMARKER; if (yyaccept <= 3) { if (yyaccept <= 1) { - if (yyaccept == 0) { + if (yyaccept <= 0) { goto yy238; } else { goto yy240; } } else { - if (yyaccept == 2) { + if (yyaccept <= 2) { goto yy236; } else { goto yy253; @@ -3421,7 +3427,7 @@ yy270: } } else { if (yyaccept <= 5) { - if (yyaccept == 4) { + if (yyaccept <= 4) { goto yy258; } else { goto yy275; @@ -3503,7 +3509,7 @@ yy275: { /* TRUE value (when used outside option value/offset this causes parse error!) */ RETURN_TOKEN(BOOL_TRUE, "1", 1); } -#line 3507 "Zend/zend_ini_scanner.c" +#line 3513 "Zend/zend_ini_scanner.c" yy276: YYDEBUG(276, *YYCURSOR); ++YYCURSOR; @@ -3707,7 +3713,7 @@ yy282: { /* FALSE value (when used outside option value/offset this causes parse error!)*/ RETURN_TOKEN(BOOL_FALSE, "", 0); } -#line 3711 "Zend/zend_ini_scanner.c" +#line 3717 "Zend/zend_ini_scanner.c" yy283: YYDEBUG(283, *YYCURSOR); ++YYCURSOR; @@ -4089,7 +4095,7 @@ yy295: SCNG(lineno)++; return END_OF_LINE; } -#line 4093 "Zend/zend_ini_scanner.c" +#line 4099 "Zend/zend_ini_scanner.c" yy296: YYDEBUG(296, *YYCURSOR); yych = *++YYCURSOR; @@ -4310,7 +4316,7 @@ yy305: } RETURN_TOKEN(TC_RAW, yytext, yyleng); } -#line 4314 "Zend/zend_ini_scanner.c" +#line 4320 "Zend/zend_ini_scanner.c" yy309: YYDEBUG(309, *YYCURSOR); ++YYCURSOR; @@ -4321,7 +4327,7 @@ yy309: yy_push_state(ST_VARNAME TSRMLS_CC); return TC_DOLLAR_CURLY; } -#line 4325 "Zend/zend_ini_scanner.c" +#line 4331 "Zend/zend_ini_scanner.c" yy311: YYDEBUG(311, *YYCURSOR); ++YYCURSOR; @@ -4411,43 +4417,48 @@ yyc_ST_VARNAME: YYDEBUG(318, *YYCURSOR); YYFILL(2); yych = *YYCURSOR; - if (yych <= '^') { - if (yych <= '9') { - if (yych >= '0') goto yy322; + if (yych <= '@') { + if (yych <= ',') { + if (yych == '*') goto yy323; + goto yy321; } else { - if (yych <= '@') goto yy320; - if (yych <= 'Z') goto yy322; + if (yych == '/') goto yy321; + if (yych <= '9') goto yy323; + goto yy321; } } else { - if (yych <= 'z') { - if (yych != '`') goto yy322; + if (yych <= '`') { + if (yych <= 'Z') goto yy323; + if (yych == '_') goto yy323; + goto yy321; } else { + if (yych <= 'z') goto yy323; if (yych == '}') goto yy324; + goto yy321; } } yy320: YYDEBUG(320, *YYCURSOR); - ++YYCURSOR; + yyleng = YYCURSOR - SCNG(yy_text); +#line 372 "Zend/zend_ini_scanner.l" + { /* Variable name */ + RETURN_TOKEN(TC_VARNAME, yytext, yyleng); +} +#line 4448 "Zend/zend_ini_scanner.c" +yy321: YYDEBUG(321, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(322, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); #line 502 "Zend/zend_ini_scanner.l" { return 0; } -#line 4438 "Zend/zend_ini_scanner.c" -yy322: - YYDEBUG(322, *YYCURSOR); - ++YYCURSOR; - yych = *YYCURSOR; - goto yy327; +#line 4458 "Zend/zend_ini_scanner.c" yy323: YYDEBUG(323, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); -#line 372 "Zend/zend_ini_scanner.l" - { /* Variable name */ - RETURN_TOKEN(TC_VARNAME, yytext, yyleng); -} -#line 4451 "Zend/zend_ini_scanner.c" + yych = *++YYCURSOR; + goto yy327; yy324: YYDEBUG(324, *YYCURSOR); ++YYCURSOR; @@ -4458,7 +4469,7 @@ yy324: yy_pop_state(TSRMLS_C); return '}'; } -#line 4462 "Zend/zend_ini_scanner.c" +#line 4473 "Zend/zend_ini_scanner.c" yy326: YYDEBUG(326, *YYCURSOR); ++YYCURSOR; @@ -4469,7 +4480,7 @@ yy327: if (yybm[0+yych] & 128) { goto yy326; } - goto yy323; + goto yy320; } } #line 506 "Zend/zend_ini_scanner.l" diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index 4485bec4c..f283acddb 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_scanner.l,v 1.41.2.2.2.2.2.16 2009/02/02 19:23:13 nlopess Exp $ */ +/* $Id: zend_ini_scanner.l,v 1.41.2.2.2.2.2.17 2009/05/19 15:59:36 shire Exp $ */ #include #include "zend.h" @@ -308,7 +308,7 @@ NEWLINE ("\r"|"\n"|"\r\n") TABS_AND_SPACES [ \t] WHITESPACE [ \t]+ CONSTANT [a-zA-Z][a-zA-Z0-9_]* -LABEL [a-zA-Z0-9_][a-zA-Z0-9*._-]* +LABEL [a-zA-Z0-9*._-]* TOKENS [:,.\[\]"'()|^&+-/*=%$!~<>?@{}] OPERATORS [&|~()!] DOLLAR_CURLY "${" diff --git a/Zend/zend_ini_scanner_defs.h b/Zend/zend_ini_scanner_defs.h index 46676e897..7c5dc4a4c 100644 --- a/Zend/zend_ini_scanner_defs.h +++ b/Zend/zend_ini_scanner_defs.h @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.6.dev on Mon Feb 2 19:23:18 2009 */ +/* Generated by re2c 0.13.5 on Tue May 19 08:53:54 2009 */ #line 3 "Zend/zend_ini_scanner_defs.h" enum YYCONDTYPE { diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 212dc2aad..d14ac528c 100755 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_interfaces.c,v 1.33.2.4.2.6.2.12 2008/12/31 11:15:32 sebastian Exp $ */ +/* $Id: zend_interfaces.c,v 1.33.2.4.2.6.2.13 2009/03/25 10:39:26 dmitry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -84,7 +84,15 @@ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend fcic.function_handler = *fn_proxy; } fcic.calling_scope = obj_ce; - fcic.called_scope = object_pp ? obj_ce : EG(called_scope); + if (object_pp) { + fcic.called_scope = Z_OBJCE_PP(object_pp); + } else if (obj_ce && + !(EG(called_scope) && + instanceof_function(EG(called_scope), obj_ce TSRMLS_CC))) { + fcic.called_scope = obj_ce; + } else { + fcic.called_scope = EG(called_scope); + } fcic.object_ptr = object_pp ? *object_pp : NULL; result = zend_call_function(&fci, &fcic TSRMLS_CC); } diff --git a/Zend/zend_language_parser.c b/Zend/zend_language_parser.c index d95a760b0..e875a5e46 100644 --- a/Zend/zend_language_parser.c +++ b/Zend/zend_language_parser.c @@ -349,7 +349,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_language_parser.y,v 1.160.2.4.2.8.2.34 2009/01/26 22:54:20 cseiler Exp $ */ +/* $Id: zend_language_parser.y,v 1.160.2.4.2.8.2.35 2009/03/26 12:37:17 dmitry Exp $ */ /* * LALR shift/reduce conflicts and how they are resolved: @@ -4889,12 +4889,12 @@ yyreduce: case 353: - { (yyval) = (yyvsp[(2) - (3)]); } + { (yyval) = (yyvsp[(2) - (3)]); CG(heredoc) = Z_STRVAL((yyvsp[(1) - (3)]).u.constant); CG(heredoc_len) = Z_STRLEN((yyvsp[(1) - (3)]).u.constant); } break; case 354: - { ZVAL_EMPTY_STRING(&(yyval).u.constant); INIT_PZVAL(&(yyval).u.constant); (yyval).op_type = IS_CONST; } + { ZVAL_EMPTY_STRING(&(yyval).u.constant); INIT_PZVAL(&(yyval).u.constant); (yyval).op_type = IS_CONST; CG(heredoc) = Z_STRVAL((yyvsp[(1) - (2)]).u.constant); CG(heredoc_len) = Z_STRLEN((yyvsp[(1) - (2)]).u.constant); } break; case 355: @@ -4979,7 +4979,7 @@ yyreduce: case 371: - { (yyval) = (yyvsp[(2) - (3)]); } + { (yyval) = (yyvsp[(2) - (3)]); CG(heredoc) = Z_STRVAL((yyvsp[(1) - (3)]).u.constant); CG(heredoc_len) = Z_STRLEN((yyvsp[(1) - (3)]).u.constant); } break; case 372: diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 619264feb..ab3c29ad0 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_language_parser.y,v 1.160.2.4.2.8.2.34 2009/01/26 22:54:20 cseiler Exp $ */ +/* $Id: zend_language_parser.y,v 1.160.2.4.2.8.2.35 2009/03/26 12:37:17 dmitry Exp $ */ /* * LALR shift/reduce conflicts and how they are resolved: @@ -763,8 +763,8 @@ common_scalar: | T_METHOD_C { $$ = $1; } | T_FUNC_C { $$ = $1; } | T_NS_C { $$ = $1; } - | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { $$ = $2; } - | T_START_HEREDOC T_END_HEREDOC { ZVAL_EMPTY_STRING(&$$.u.constant); INIT_PZVAL(&$$.u.constant); $$.op_type = IS_CONST; } + | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { $$ = $2; CG(heredoc) = Z_STRVAL($1.u.constant); CG(heredoc_len) = Z_STRLEN($1.u.constant); } + | T_START_HEREDOC T_END_HEREDOC { ZVAL_EMPTY_STRING(&$$.u.constant); INIT_PZVAL(&$$.u.constant); $$.op_type = IS_CONST; CG(heredoc) = Z_STRVAL($1.u.constant); CG(heredoc_len) = Z_STRLEN($1.u.constant); } ; @@ -791,7 +791,7 @@ scalar: | T_NS_SEPARATOR namespace_name { char *tmp = estrndup(Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL($2.u.constant)); Z_STRVAL($2.u.constant) = tmp; ++Z_STRLEN($2.u.constant); zend_do_fetch_constant(&$$, NULL, &$2, ZEND_RT, 0 TSRMLS_CC); } | common_scalar { $$ = $1; } | '"' encaps_list '"' { $$ = $2; } - | T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; } + | T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; CG(heredoc) = Z_STRVAL($1.u.constant); CG(heredoc_len) = Z_STRLEN($1.u.constant); } ; diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c index 56fc21be6..607a9df66 100644 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@ -1,4 +1,5 @@ -/* Generated by re2c 0.13.5 on Mon Mar 23 21:40:47 2009 */ +/* Generated by re2c 0.13.5 on Mon May 04 19:38:30 2009 */ +#line 1 "Zend/zend_language_scanner.l" /* +----------------------------------------------------------------------+ | Zend Engine | @@ -22,7 +23,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_language_scanner.l,v 1.131.2.11.2.13.2.37 2009/03/16 01:40:13 shire Exp $ */ +/* $Id: zend_language_scanner.c,v 1.1.2.38 2009/05/05 01:44:50 mattwil Exp $ */ #if 0 # define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c) @@ -110,6 +111,12 @@ do { \ } \ } +/* To save initial string length after scanning to first variable, CG(doc_comment_len) can be reused */ +#define SET_DOUBLE_QUOTES_SCANNED_LENGTH(len) CG(doc_comment_len) = (len) +#define GET_DOUBLE_QUOTES_SCANNED_LENGTH() CG(doc_comment_len) + +#define IS_LABEL_START(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || (c) == '_' || (c) >= 0x7F) + #define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7') #define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F')) @@ -144,9 +151,7 @@ void startup_scanner(TSRMLS_D) CG(heredoc_len) = 0; CG(doc_comment) = NULL; CG(doc_comment_len) = 0; - zend_llist_init(&SCNG(used_state_stacks), sizeof(zend_stack), (llist_dtor_func_t) zend_stack_destroy, 0); zend_stack_init(&SCNG(state_stack)); - zend_llist_add_element(&SCNG(used_state_stacks), &SCNG(state_stack)); } void shutdown_scanner(TSRMLS_D) @@ -155,15 +160,10 @@ void shutdown_scanner(TSRMLS_D) efree(CG(heredoc)); CG(heredoc_len)=0; } - zend_llist_destroy(&SCNG(used_state_stacks)); + zend_stack_destroy(&SCNG(state_stack)); RESET_DOC_COMMENT(); } -static int compare_stacks(zend_stack *stack1, zend_stack *stack2) -{ - return (stack1 == stack2); -} - ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC) { lex_state->yy_leng = SCNG(yy_leng); @@ -175,7 +175,6 @@ ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC) lex_state->state_stack = SCNG(state_stack); zend_stack_init(&SCNG(state_stack)); - zend_llist_add_element(&SCNG(used_state_stacks), &SCNG(state_stack)); lex_state->in = SCNG(yy_in); lex_state->yy_state = YYSTATE; @@ -203,7 +202,7 @@ ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC) SCNG(yy_marker) = lex_state->yy_marker; SCNG(yy_limit) = lex_state->yy_limit; - zend_llist_del_element(&SCNG(used_state_stacks), &SCNG(state_stack), (int (*)(void *, void *)) compare_stacks); + zend_stack_destroy(&SCNG(state_stack)); SCNG(state_stack) = lex_state->state_stack; SCNG(yy_in) = lex_state->in; @@ -362,9 +361,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR retval = NULL; } } - if (compilation_successful) { - zend_restore_lexical_state(&original_lex_state TSRMLS_CC); - } + zend_restore_lexical_state(&original_lex_state TSRMLS_CC); return retval; } @@ -527,8 +524,8 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC) zend_release_labels(TSRMLS_C); retval = op_array; } - zend_restore_lexical_state(&original_lex_state TSRMLS_CC); } + zend_restore_lexical_state(&original_lex_state TSRMLS_CC); zval_dtor(&tmp); CG(in_compilation) = original_in_compilation; return retval; @@ -548,6 +545,7 @@ int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlight zend_save_lexical_state(&original_lex_state TSRMLS_CC); if (open_file_for_scanning(&file_handle TSRMLS_CC)==FAILURE) { zend_message_dispatcher(ZMSG_FAILED_HIGHLIGHT_FOPEN, filename TSRMLS_CC); + zend_restore_lexical_state(&original_lex_state TSRMLS_CC); return FAILURE; } zend_highlight(syntax_highlighter_ini TSRMLS_CC); @@ -575,6 +573,7 @@ int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ zval_copy_ctor(str); zend_save_lexical_state(&original_lex_state TSRMLS_CC); if (zend_prepare_string_for_scanning(str, str_name TSRMLS_CC)==FAILURE) { + zend_restore_lexical_state(&original_lex_state TSRMLS_CC); return FAILURE; } BEGIN(INITIAL); @@ -835,51 +834,40 @@ restart: yymore_restart: +#line 838 "Zend/zend_language_scanner.c" { YYCTYPE yych; unsigned int yyaccept = 0; - if (YYGETCONDITION() < 6) { - if (YYGETCONDITION() < 3) { + if (YYGETCONDITION() < 5) { + if (YYGETCONDITION() < 2) { if (YYGETCONDITION() < 1) { goto yyc_ST_IN_SCRIPTING; } else { - if (YYGETCONDITION() < 2) { - goto yyc_ST_LOOKING_FOR_PROPERTY; - } else { - goto yyc_ST_BACKQUOTE; - } + goto yyc_ST_LOOKING_FOR_PROPERTY; } } else { - if (YYGETCONDITION() < 4) { - goto yyc_ST_DOUBLE_QUOTES; + if (YYGETCONDITION() < 3) { + goto yyc_ST_BACKQUOTE; } else { - if (YYGETCONDITION() < 5) { - goto yyc_ST_HEREDOC; + if (YYGETCONDITION() < 4) { + goto yyc_ST_DOUBLE_QUOTES; } else { - goto yyc_ST_LOOKING_FOR_VARNAME; + goto yyc_ST_HEREDOC; } } } } else { - if (YYGETCONDITION() < 9) { - if (YYGETCONDITION() < 7) { - goto yyc_ST_VAR_OFFSET; + if (YYGETCONDITION() < 7) { + if (YYGETCONDITION() < 6) { + goto yyc_ST_LOOKING_FOR_VARNAME; } else { - if (YYGETCONDITION() < 8) { - goto yyc_INITIAL; - } else { - goto yyc_ST_ONE_LINE_COMMENT; - } + goto yyc_ST_VAR_OFFSET; } } else { - if (YYGETCONDITION() < 11) { - if (YYGETCONDITION() < 10) { - goto yyc_ST_COMMENT; - } else { - goto yyc_ST_DOC_COMMENT; - } + if (YYGETCONDITION() < 8) { + goto yyc_INITIAL; } else { - if (YYGETCONDITION() < 12) { + if (YYGETCONDITION() < 9) { goto yyc_ST_END_HEREDOC; } else { goto yyc_ST_NOWDOC; @@ -928,56 +916,67 @@ yyc_INITIAL: YYDEBUG(0, *YYCURSOR); YYFILL(8); yych = *YYCURSOR; - if (yych <= 0x00) goto yy2; - if (yych == '<') goto yy4; - goto yy6; -yy2: + if (yych != '<') goto yy4; YYDEBUG(2, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(3, *YYCURSOR); - yyleng = YYCURSOR - SCNG(yy_text); - { return 0; } -yy4: - YYDEBUG(4, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '?') { - if (yych == '%') goto yy9; - if (yych >= '?') goto yy7; + if (yych == '%') goto yy7; + if (yych >= '?') goto yy5; } else { if (yych <= 'S') { - if (yych >= 'S') goto yy11; + if (yych >= 'S') goto yy9; } else { - if (yych == 's') goto yy11; + if (yych == 's') goto yy9; } } -yy5: - YYDEBUG(5, *YYCURSOR); +yy3: + YYDEBUG(3, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); +#line 1562 "Zend/zend_language_scanner.l" { + if (YYCURSOR > YYLIMIT) { + return 0; + } inline_char_handler: while (1) { YYCTYPE *ptr = memchr(YYCURSOR, '<', YYLIMIT - YYCURSOR); - if (ptr == NULL) { - YYCURSOR = YYLIMIT; - yyleng = YYCURSOR - SCNG(yy_text); - break; - - } else { - YYCURSOR = ptr + 1; + YYCURSOR = ptr ? ptr + 1 : YYLIMIT; - /* stop if it may be an opening tag (). this condition is not optimal though */ - if (YYCURSOR < YYLIMIT && (*YYCURSOR == '?' || *YYCURSOR == '%' || *YYCURSOR == 's')) { - --YYCURSOR; - yyleng = YYCURSOR - SCNG(yy_text); - break; + if (YYCURSOR < YYLIMIT) { + switch (*YYCURSOR) { + case '?': + if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3)) { /* Assume [ \t\n\r] follows "php" */ + break; + } + continue; + case '%': + if (CG(asp_tags)) { + break; + } + continue; + case 's': + case 'S': + /* Probably NOT an opening PHP