]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.0' into PHP-7.1
authorAndrea Faulds <ajf@ajf.me>
Sun, 11 Sep 2016 21:46:20 +0000 (22:46 +0100)
committerAndrea Faulds <ajf@ajf.me>
Sun, 11 Sep 2016 21:46:20 +0000 (22:46 +0100)
18 files changed:
1  2 
Zend/zend_API.c
Zend/zend_API.h
Zend/zend_builtin_functions.c
Zend/zend_generators.c
ext/pcre/php_pcre.c
ext/reflection/php_reflection.c
ext/spl/spl_array.c
ext/standard/array.c
ext/standard/basic_functions.c
ext/standard/file.c
ext/standard/filestat.c
ext/standard/formatted_print.c
ext/standard/html.c
ext/standard/math.c
ext/standard/streamsfuncs.c
ext/standard/string.c
ext/standard/type.c
ext/standard/url.c

diff --cc Zend/zend_API.c
index eaed067b69ac72711df2e1a85c609e51569dc031,4c77aa95752180efee154fd2b78e020d994fddba..475e3a74e98873287c3a1768e1fad4834826dcec
@@@ -202,8 -197,7 +202,7 @@@ ZEND_API char *zend_zval_type_name(cons
  }
  /* }}} */
  
- #ifdef FAST_ZPP
 -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_paramers_count_error(int num_args, int min_num_args, int max_num_args) /* {{{ */
 +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int num_args, int min_num_args, int max_num_args) /* {{{ */
  {
        zend_function *active_function = EG(current_execute_data)->func;
        const char *class_name = active_function->common.scope ? ZSTR_VAL(active_function->common.scope->name) : "";
diff --cc Zend/zend_API.h
Simple merge
index c84a1f1bcde0f75d9b447edf9a83f0a9f4e353d0,4f2a62d822819df2a846a1fe1d6694eae3614189..f118ebd12a35c1697cdd45c2f1c7685c2f1c4a1e
@@@ -767,14 -683,9 +761,9 @@@ ZEND_FUNCTION(each
     Return the current error_reporting level, and if an argument was passed - change to the new level */
  ZEND_FUNCTION(error_reporting)
  {
 -      zval *err;
 +      zval *err = NULL;
        int old_error_reporting;
  
- #ifndef FAST_ZPP
-       if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &err) == FAILURE) {
-               return;
-       }
- #else
        ZEND_PARSE_PARAMETERS_START(0, 1)
                Z_PARAM_OPTIONAL
                Z_PARAM_ZVAL(err)
@@@ -988,14 -892,8 +970,8 @@@ ZEND_FUNCTION(defined
        ZEND_PARSE_PARAMETERS_START(1, 1)
                Z_PARAM_STR(name)
        ZEND_PARSE_PARAMETERS_END();
- #endif
  
 -      if (zend_get_constant_ex(name, NULL, ZEND_FETCH_CLASS_SILENT)) {
 +      if (zend_get_constant_ex(name, zend_get_executed_scope(), ZEND_FETCH_CLASS_SILENT)) {
                RETURN_TRUE;
        } else {
                RETURN_FALSE;
Simple merge
Simple merge
Simple merge
Simple merge
index af9734d3d7b919702d6162611c38de449691d068,136890c19807f604787886a6ec23d4b737407a2f..078b84ab8f198cab644beed8b28dc3fe77095ee2
@@@ -1550,15 -1474,8 +1496,8 @@@ PHP_FUNCTION(array_walk
        orig_array_walk_fci = BG(array_walk_fci);
        orig_array_walk_fci_cache = BG(array_walk_fci_cache);
  
- #ifndef FAST_ZPP
-       if (zend_parse_parameters(ZEND_NUM_ARGS(), "A/f|z/", &array, &BG(array_walk_fci), &BG(array_walk_fci_cache), &userdata) == FAILURE) {
-               BG(array_walk_fci) = orig_array_walk_fci;
-               BG(array_walk_fci_cache) = orig_array_walk_fci_cache;
-               return;
-       }
- #else
        ZEND_PARSE_PARAMETERS_START(2, 3)
 -              Z_PARAM_ARRAY_OR_OBJECT_HT_EX(array, 0, 1)
 +              Z_PARAM_ARRAY_OR_OBJECT_EX(array, 0, 1)
                Z_PARAM_FUNC(BG(array_walk_fci), BG(array_walk_fci_cache))
                Z_PARAM_OPTIONAL
                Z_PARAM_ZVAL_EX(userdata, 0, 1)
@@@ -3237,13 -3088,8 +3139,8 @@@ static inline void php_array_merge_or_r
  {
        zval *args = NULL;
        zval *arg;
 -      int argc, i, init_size = 0;
 +      int argc, i;
  
- #ifndef FAST_ZPP
-       if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argc) == FAILURE) {
-               return;
-       }
- #else
        ZEND_PARSE_PARAMETERS_START(1, -1)
                Z_PARAM_VARIADIC('+', args, argc)
        ZEND_PARSE_PARAMETERS_END();
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index a3b0add7f0188b959423d434b2d0f6ffb8ef4922,c3becb9daa641bab06444fb875e2a5ad180b1907..5e6b2072651556a370b9a801c64b48b969a1d7c1
@@@ -1971,11 -1922,7 +1930,10 @@@ PHP_FUNCTION(strpos
                Z_PARAM_OPTIONAL
                Z_PARAM_LONG(offset)
        ZEND_PARSE_PARAMETERS_END();
- #endif
  
 +      if (offset < 0) {
 +              offset += (zend_long)ZSTR_LEN(haystack);
 +      }
        if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) {
                php_error_docref(NULL, E_WARNING, "Offset not contained in string");
                RETURN_FALSE;
index 3f97bc86883d7e931029475ef1c3665c037e5e52,c94699210e76b0c48432bdb07fbdf364a10e9dde..60884da94e0cb92341a39598a13f2e1a4471049e
@@@ -152,9 -147,8 +147,8 @@@ PHP_FUNCTION(intval
                Z_PARAM_OPTIONAL
                Z_PARAM_LONG(base)
        ZEND_PARSE_PARAMETERS_END();
- #endif
  
 -      if (Z_TYPE_P(num) != IS_STRING) {
 +      if (Z_TYPE_P(num) != IS_STRING || base == 10) {
                RETVAL_LONG(zval_get_long(num));
        } else {
                RETVAL_LONG(ZEND_STRTOL(Z_STRVAL_P(num), NULL, base));
Simple merge