summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Faulds <ajf@ajf.me>2016-09-11 22:44:46 +0100
committerAndrea Faulds <ajf@ajf.me>2016-09-11 22:44:46 +0100
commitd690014bf35507ccb7a1150a27504d2f87848842 (patch)
tree5913a3bbcad247de83e68e0e61448279ff5f5f47
parent529811cfb0c664c53752a295adcda472d336205a (diff)
downloadphp-git-d690014bf35507ccb7a1150a27504d2f87848842.tar.gz
Remove zpp fallback code (always use Fast ZPP)
Squashed commit of the following: commit 3e27fbb3d22b42d181e15c345f1c59a007b6b58c Author: Andrea Faulds <ajf@ajf.me> Date: Sun Sep 11 19:14:37 2016 +0100 Keep dummy FAST_ZPP macro for compatibility commit 8a7cfd00deaa4a3c5026c97580c49c886c72a5b4 Author: Andrea Faulds <ajf@ajf.me> Date: Mon Sep 5 22:36:03 2016 +0100 Remove FAST_ZPP macro and plain zpp fallback code
-rw-r--r--Zend/zend_API.c2
-rw-r--r--Zend/zend_API.h8
-rw-r--r--Zend/zend_builtin_functions.c67
-rw-r--r--Zend/zend_generators.c12
-rw-r--r--ext/gettext/gettext.c6
-rw-r--r--ext/pcre/php_pcre.c58
-rw-r--r--ext/reflection/php_reflection.c6
-rw-r--r--ext/spl/spl_array.c6
-rw-r--r--ext/standard/array.c128
-rw-r--r--ext/standard/basic_functions.c12
-rw-r--r--ext/standard/file.c60
-rw-r--r--ext/standard/filestat.c16
-rw-r--r--ext/standard/formatted_print.c6
-rw-r--r--ext/standard/html.c13
-rw-r--r--ext/standard/math.c180
-rw-r--r--ext/standard/streamsfuncs.c72
-rw-r--r--ext/standard/string.c102
-rw-r--r--ext/standard/type.c31
-rw-r--r--ext/standard/url.c24
19 files changed, 4 insertions, 805 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 55c6be8711..4c77aa9575 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -197,7 +197,6 @@ ZEND_API char *zend_zval_type_name(const zval *arg) /* {{{ */
}
/* }}} */
-#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_function *active_function = EG(current_execute_data)->func;
@@ -291,7 +290,6 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pc
return 1;
}
/* }}} */
-#endif
ZEND_API int ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, zend_bool *dest) /* {{{ */
{
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 822dbb08b8..7fd7756674 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -665,13 +665,11 @@ END_EXTERN_C()
/* Fast parameter parsing API */
-/* This API should be used only for really often used functions.
- * (Keep the original parsing code and wrap usage with #ifndef FAST_ZPP)
+/* Fast ZPP is always enabled now; this define is left in for compatibility
+ * with any existing conditional compilation blocks.
*/
#define FAST_ZPP 1
-#ifdef FAST_ZPP
-
#define Z_EXPECTED_TYPES(_) \
_(Z_EXPECTED_LONG, "integer") \
_(Z_EXPECTED_BOOL, "boolean") \
@@ -1034,8 +1032,6 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int severity, in
#define Z_PARAM_VARIADIC(spec, dest, dest_num) \
Z_PARAM_VARIADIC_EX(spec, dest, dest_num, 0)
-#endif /* FAST_ZPP */
-
/* End of new parameter parsing API */
/* Inlined implementations shared by new and old parameter parsing APIs */
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 6a0970d373..4f2a62d822 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -544,15 +544,9 @@ ZEND_FUNCTION(strlen)
{
zend_string *s;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &s) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(s)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETVAL_LONG(ZSTR_LEN(s));
}
@@ -692,16 +686,10 @@ ZEND_FUNCTION(error_reporting)
zval *err;
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)
ZEND_PARSE_PARAMETERS_END();
-#endif
old_error_reporting = EG(error_reporting);
if (ZEND_NUM_ARGS() != 0) {
@@ -815,18 +803,12 @@ ZEND_FUNCTION(define)
int case_sensitive = CONST_CS;
zend_constant c;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|b", &name, &val, &non_cs) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(name)
Z_PARAM_ZVAL(val)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(non_cs)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (non_cs) {
case_sensitive = 0;
@@ -907,15 +889,9 @@ ZEND_FUNCTION(defined)
{
zend_string *name;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &name) == FAILURE) {
- return;
- }
-#else
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)) {
RETURN_TRUE;
@@ -1011,18 +987,12 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass) /*
zend_bool allow_string = only_subclass;
zend_bool retval;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "zS|b", &obj, &class_name, &allow_string) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_ZVAL(obj)
Z_PARAM_STR(class_name)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(allow_string)
ZEND_PARSE_PARAMETERS_END();
-#endif
/*
* allow_string - is_a default is no, is_subclass_of is yes.
* if it's allowed, then the autoloader will be called if the class does not exist.
@@ -1162,15 +1132,9 @@ ZEND_FUNCTION(get_object_vars)
zend_string *key;
zend_object *zobj;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_OBJECT(obj)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (Z_OBJ_HT_P(obj)->get_properties == NULL) {
RETURN_FALSE;
@@ -1306,16 +1270,11 @@ ZEND_FUNCTION(method_exists)
zend_string *lcname;
zend_class_entry * ce;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "zS", &klass, &method_name) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_ZVAL(klass)
Z_PARAM_STR(method_name)
ZEND_PARSE_PARAMETERS_END();
-#endif
+
if (Z_TYPE_P(klass) == IS_OBJECT) {
ce = Z_OBJCE_P(klass);
} else if (Z_TYPE_P(klass) == IS_STRING) {
@@ -1411,17 +1370,11 @@ ZEND_FUNCTION(class_exists)
zend_class_entry *ce;
zend_bool autoload = 1;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|b", &class_name, &autoload) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STR(class_name)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(autoload)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (!autoload) {
if (ZSTR_VAL(class_name)[0] == '\\') {
@@ -1454,17 +1407,11 @@ ZEND_FUNCTION(interface_exists)
zend_class_entry *ce;
zend_bool autoload = 1;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|b", &iface_name, &autoload) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STR(iface_name)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(autoload)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (!autoload) {
if (ZSTR_VAL(iface_name)[0] == '\\') {
@@ -1496,17 +1443,11 @@ ZEND_FUNCTION(trait_exists)
zend_class_entry *ce;
zend_bool autoload = 1;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|b", &trait_name, &autoload) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STR(trait_name)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(autoload)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (!autoload) {
if (ZSTR_VAL(trait_name)[0] == '\\') {
@@ -1539,15 +1480,9 @@ ZEND_FUNCTION(function_exists)
zend_function *func;
zend_string *lcname;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &name) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(name)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (ZSTR_VAL(name)[0] == '\\') {
/* Ignore leading "\" */
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c
index 04fedbe200..6055e76e96 100644
--- a/Zend/zend_generators.c
+++ b/Zend/zend_generators.c
@@ -872,15 +872,9 @@ ZEND_METHOD(Generator, send)
zval *value;
zend_generator *generator, *root;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &value) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ZVAL(value)
ZEND_PARSE_PARAMETERS_END();
-#endif
generator = (zend_generator *) Z_OBJ_P(getThis());
@@ -916,15 +910,9 @@ ZEND_METHOD(Generator, throw)
zval *exception, exception_copy;
zend_generator *generator;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &exception) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ZVAL(exception)
ZEND_PARSE_PARAMETERS_END();
-#endif
ZVAL_DUP(&exception_copy, exception);
diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c
index 6169888ce2..44e8a354a7 100644
--- a/ext/gettext/gettext.c
+++ b/ext/gettext/gettext.c
@@ -189,15 +189,9 @@ PHP_NAMED_FUNCTION(zif_gettext)
char *msgstr;
zend_string *msgid;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &msgid) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(msgid)
ZEND_PARSE_PARAMETERS_END();
-#endif
PHP_GETTEXT_LENGTH_CHECK("msgid", ZSTR_LEN(msgid))
msgstr = gettext(ZSTR_VAL(msgid));
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 2ae5b98cd6..8541feb523 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -631,12 +631,6 @@ static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ *
zend_long flags = 0; /* Match control flags */
zend_long start_offset = 0; /* Where the new search starts */
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|z/ll", &regex,
- &subject, &subpats, &flags, &start_offset) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 5)
Z_PARAM_STR(regex)
Z_PARAM_STR(subject)
@@ -645,7 +639,6 @@ static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ *
Z_PARAM_LONG(flags)
Z_PARAM_LONG(start_offset)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
if (ZEND_SIZE_T_INT_OVFL(ZSTR_LEN(subject))) {
php_error_docref(NULL, E_WARNING, "Subject is too long");
@@ -1542,12 +1535,7 @@ static PHP_FUNCTION(preg_replace)
zend_long limit = -1;
int replace_count;
-#ifndef FAST_ZPP
/* Get function parameters and do error-checking. */
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "zzz|lz/", &regex, &replace, &subject, &limit, &zcount) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(3, 5)
Z_PARAM_ZVAL(regex)
Z_PARAM_ZVAL(replace)
@@ -1556,7 +1544,6 @@ static PHP_FUNCTION(preg_replace)
Z_PARAM_LONG(limit)
Z_PARAM_ZVAL_EX(zcount, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (Z_TYPE_P(replace) == IS_ARRAY && Z_TYPE_P(regex) != IS_ARRAY) {
php_error_docref(NULL, E_WARNING, "Parameter mismatch, pattern is a string while replacement is an array");
@@ -1580,12 +1567,7 @@ static PHP_FUNCTION(preg_replace_callback)
zend_string *callback_name;
int replace_count;
-#ifndef FAST_ZPP
/* Get function parameters and do error-checking. */
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "zzz|lz/", &regex, &replace, &subject, &limit, &zcount) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(3, 5)
Z_PARAM_ZVAL(regex)
Z_PARAM_ZVAL(replace)
@@ -1594,7 +1576,6 @@ static PHP_FUNCTION(preg_replace_callback)
Z_PARAM_LONG(limit)
Z_PARAM_ZVAL_EX(zcount, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (!zend_is_callable(replace, 0, &callback_name)) {
php_error_docref(NULL, E_WARNING, "Requires argument 2, '%s', to be a valid callback", ZSTR_VAL(callback_name));
@@ -1622,12 +1603,7 @@ static PHP_FUNCTION(preg_replace_callback_array)
zend_string *callback_name;
int replace_count = 0;
-#ifndef FAST_ZPP
/* Get function parameters and do error-checking. */
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "az|lz/", &pattern, &subject, &limit, &zcount) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 4)
Z_PARAM_ARRAY(pattern)
Z_PARAM_ZVAL(subject)
@@ -1635,7 +1611,6 @@ static PHP_FUNCTION(preg_replace_callback_array)
Z_PARAM_LONG(limit)
Z_PARAM_ZVAL_EX(zcount, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
ZVAL_UNDEF(&zv);
ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(pattern), str_idx, replace) {
@@ -1693,12 +1668,7 @@ static PHP_FUNCTION(preg_filter)
zend_long limit = -1;
int replace_count;
-#ifndef FAST_ZPP
/* Get function parameters and do error-checking. */
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "zzz|lz/", &regex, &replace, &subject, &limit, &zcount) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(3, 5)
Z_PARAM_ZVAL(regex)
Z_PARAM_ZVAL(replace)
@@ -1707,7 +1677,6 @@ static PHP_FUNCTION(preg_filter)
Z_PARAM_LONG(limit)
Z_PARAM_ZVAL_EX(zcount, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (Z_TYPE_P(replace) == IS_ARRAY && Z_TYPE_P(regex) != IS_ARRAY) {
php_error_docref(NULL, E_WARNING, "Parameter mismatch, pattern is a string while replacement is an array");
@@ -1733,12 +1702,6 @@ static PHP_FUNCTION(preg_split)
pcre_cache_entry *pce; /* Compiled regular expression */
/* Get function parameters and do error checking */
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|ll", &regex,
- &subject, &limit_val, &flags) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 4)
Z_PARAM_STR(regex)
Z_PARAM_STR(subject)
@@ -1746,7 +1709,6 @@ static PHP_FUNCTION(preg_split)
Z_PARAM_LONG(limit_val)
Z_PARAM_LONG(flags)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
if (ZEND_SIZE_T_INT_OVFL(ZSTR_LEN(subject))) {
php_error_docref(NULL, E_WARNING, "Subject is too long");
@@ -1939,18 +1901,11 @@ static PHP_FUNCTION(preg_quote)
zend_bool quote_delim = 0; /* Whether to quote additional delim char */
/* Get the arguments and check for errors */
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &in_str, &in_str_len,
- &delim, &delim_len) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STRING(in_str, in_str_len)
Z_PARAM_OPTIONAL
Z_PARAM_STRING(delim, delim_len)
ZEND_PARSE_PARAMETERS_END();
-#endif
in_str_end = in_str + in_str_len;
@@ -2028,19 +1983,12 @@ static PHP_FUNCTION(preg_grep)
pcre_cache_entry *pce; /* Compiled regular expression */
/* Get arguments and do error checking */
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sa|l", &regex,
- &input, &flags) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(regex)
Z_PARAM_ARRAY(input)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(flags)
ZEND_PARSE_PARAMETERS_END();
-#endif
/* Compile regex or get it from cache. */
if ((pce = pcre_get_compiled_regex_cache(regex)) == NULL) {
@@ -2141,14 +2089,8 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return
Returns the error code of the last regexp execution. */
static PHP_FUNCTION(preg_last_error)
{
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(0, 0)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_LONG(PCRE_G(error_code));
}
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 08acc7e5d2..b24f9c691d 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1515,17 +1515,11 @@ ZEND_METHOD(reflection, export)
int result;
zend_bool return_output = 0;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &object, reflector_ptr, &return_output) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_OBJECT_OF_CLASS(object, reflector_ptr)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(return_output)
ZEND_PARSE_PARAMETERS_END();
-#endif
/* Invoke the __toString() method */
ZVAL_STRINGL(&fname, "__tostring", sizeof("__tostring") - 1);
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 60cbac5726..3bb0e367ea 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -1224,15 +1224,9 @@ SPL_METHOD(Array, setIteratorClass)
spl_array_object *intern = Z_SPLARRAY_P(object);
zend_class_entry * ce_get_iterator = spl_ce_Iterator;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "C", &ce_get_iterator) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_CLASS(ce_get_iterator)
ZEND_PARSE_PARAMETERS_END();
-#endif
intern->ce_get_iterator = ce_get_iterator;
}
diff --git a/ext/standard/array.c b/ext/standard/array.c
index fbbf3cf078..136890c198 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -706,17 +706,11 @@ PHP_FUNCTION(krsort)
zend_long sort_type = PHP_SORT_REGULAR;
compare_func_t cmp;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/|l", &array, &sort_type) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_ARRAY_EX(array, 0, 1)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(sort_type)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
cmp = php_get_key_compare_func(sort_type, 1);
@@ -735,17 +729,11 @@ PHP_FUNCTION(ksort)
zend_long sort_type = PHP_SORT_REGULAR;
compare_func_t cmp;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/|l", &array, &sort_type) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_ARRAY_EX(array, 0, 1)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(sort_type)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
cmp = php_get_key_compare_func(sort_type, 0);
@@ -795,17 +783,11 @@ PHP_FUNCTION(count)
zend_long cnt;
zval *element;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &array, &mode) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_ZVAL(array)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(mode)
ZEND_PARSE_PARAMETERS_END();
-#endif
switch (Z_TYPE_P(array)) {
case IS_NULL:
@@ -1140,15 +1122,9 @@ PHP_FUNCTION(end)
HashTable *array;
zval *entry;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "H/", &array) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY_OR_OBJECT_HT_EX(array, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
zend_hash_internal_pointer_end(array);
@@ -1174,15 +1150,9 @@ PHP_FUNCTION(prev)
HashTable *array;
zval *entry;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "H/", &array) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY_OR_OBJECT_HT_EX(array, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
zend_hash_move_backwards(array);
@@ -1208,15 +1178,9 @@ PHP_FUNCTION(next)
HashTable *array;
zval *entry;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "H/", &array) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY_OR_OBJECT_HT_EX(array, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
zend_hash_move_forward(array);
@@ -1242,15 +1206,9 @@ PHP_FUNCTION(reset)
HashTable *array;
zval *entry;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "H/", &array) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY_OR_OBJECT_HT_EX(array, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
zend_hash_internal_pointer_reset(array);
@@ -1276,15 +1234,9 @@ PHP_FUNCTION(current)
HashTable *array;
zval *entry;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "H", &array) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY_OR_OBJECT_HT(array)
ZEND_PARSE_PARAMETERS_END();
-#endif
if ((entry = zend_hash_get_current_data(array)) == NULL) {
RETURN_FALSE;
@@ -1305,15 +1257,9 @@ PHP_FUNCTION(key)
{
HashTable *array;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "H", &array) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY_OR_OBJECT_HT(array)
ZEND_PARSE_PARAMETERS_END();
-#endif
zend_hash_get_current_key_zval(array, return_value);
}
@@ -1528,13 +1474,6 @@ 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(), "H/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_FUNC(BG(array_walk_fci), BG(array_walk_fci_cache))
@@ -1545,7 +1484,6 @@ PHP_FUNCTION(array_walk)
BG(array_walk_fci_cache) = orig_array_walk_fci_cache;
return
);
-#endif
php_array_walk(array, userdata, 0);
BG(array_walk_fci) = orig_array_walk_fci;
@@ -1592,18 +1530,12 @@ static inline void php_search_array(INTERNAL_FUNCTION_PARAMETERS, int behavior)
zend_string *str_idx;
zend_bool strict = 0; /* strict comparison or not */
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "za|b", &value, &array, &strict) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_ZVAL(value)
Z_PARAM_ARRAY(array)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(strict)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (strict) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(array), num_idx, str_idx, entry) {
@@ -1777,18 +1709,12 @@ PHP_FUNCTION(extract)
zend_array *symbol_table;
zval var_array;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|lz/", &var_array_param, &extract_type, &prefix) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 3)
Z_PARAM_ARRAY(var_array_param)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(extract_type)
Z_PARAM_ZVAL_EX(prefix, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
extract_refs = (extract_type & EXTR_REFS);
if (extract_refs) {
@@ -2003,17 +1929,11 @@ PHP_FUNCTION(array_fill)
zval *val;
zend_long start_key, num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "llz", &start_key, &num, &val) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(3, 3)
Z_PARAM_LONG(start_key)
Z_PARAM_LONG(num)
Z_PARAM_ZVAL(val)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (EXPECTED(num > 0)) {
if (sizeof(num) > 4 && UNEXPECTED(EXPECTED(num > 0x7fffffff))) {
@@ -2607,15 +2527,9 @@ PHP_FUNCTION(array_pop)
uint32_t idx;
Bucket *p;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/", &stack) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY_EX(stack, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (zend_hash_num_elements(Z_ARRVAL_P(stack)) == 0) {
return;
@@ -2668,15 +2582,9 @@ PHP_FUNCTION(array_shift)
uint32_t idx;
Bucket *p;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/", &stack) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY_EX(stack, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (zend_hash_num_elements(Z_ARRVAL_P(stack)) == 0) {
return;
@@ -2919,11 +2827,6 @@ PHP_FUNCTION(array_slice)
zend_string *string_key;
zend_ulong num_key;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "al|zb", &input, &offset, &z_length, &preserve_keys) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 4)
Z_PARAM_ARRAY(input)
Z_PARAM_LONG(offset)
@@ -2931,7 +2834,6 @@ PHP_FUNCTION(array_slice)
Z_PARAM_ZVAL(z_length)
Z_PARAM_BOOL(preserve_keys)
ZEND_PARSE_PARAMETERS_END();
-#endif
/* Get number of entries in the input hash */
num_in = zend_hash_num_elements(Z_ARRVAL_P(input));
@@ -3188,15 +3090,9 @@ static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETE
zval *arg;
int argc, i, init_size = 0;
-#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();
-#endif
for (i = 0; i < argc; i++) {
zval *arg = args + i;
@@ -3345,18 +3241,12 @@ PHP_FUNCTION(array_keys)
zend_ulong num_idx;
zend_string *str_idx;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|zb", &input, &search_value, &strict) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 3)
Z_PARAM_ARRAY(input)
Z_PARAM_OPTIONAL
Z_PARAM_ZVAL(search_value)
Z_PARAM_BOOL(strict)
ZEND_PARSE_PARAMETERS_END();
-#endif
/* Initialize return array */
if (search_value != NULL) {
@@ -3414,15 +3304,9 @@ PHP_FUNCTION(array_values)
zval *input, /* Input array */
*entry; /* An entry in the input array */
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a", &input) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY(input)
ZEND_PARSE_PARAMETERS_END();
-#endif
/* Initialize return array */
array_init_size(return_value, zend_hash_num_elements(Z_ARRVAL_P(input)));
@@ -5299,16 +5183,10 @@ PHP_FUNCTION(array_map)
int i;
uint32_t k, maxlen = 0;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "f!+", &fci, &fci_cache, &arrays, &n_arrays) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, -1)
Z_PARAM_FUNC_EX(fci, fci_cache, 1, 0)
Z_PARAM_VARIADIC('+', arrays, n_arrays)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETVAL_NULL();
@@ -5457,16 +5335,10 @@ PHP_FUNCTION(array_key_exists)
zval *key; /* key to check for */
HashTable *array; /* array to check in */
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "zH", &key, &array) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_ZVAL(key)
Z_PARAM_ARRAY_OR_OBJECT_HT(array)
ZEND_PARSE_PARAMETERS_END();
-#endif
switch (Z_TYPE_P(key)) {
case IS_STRING:
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 99a8837869..09124fa025 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -4770,16 +4770,10 @@ PHP_FUNCTION(call_user_func)
zend_fcall_info fci;
zend_fcall_info_cache fci_cache;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "f*", &fci, &fci_cache, &fci.params, &fci.param_count) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, -1)
Z_PARAM_FUNC(fci, fci_cache)
Z_PARAM_VARIADIC('*', fci.params, fci.param_count)
ZEND_PARSE_PARAMETERS_END();
-#endif
fci.retval = &retval;
@@ -4798,16 +4792,10 @@ PHP_FUNCTION(call_user_func_array)
zend_fcall_info fci;
zend_fcall_info_cache fci_cache;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "fa/", &fci, &fci_cache, &params) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_FUNC(fci, fci_cache)
Z_PARAM_ARRAY_EX(params, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
zend_fcall_info_args(&fci, params);
fci.retval = &retval;
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 5b051774c9..7bf2807f51 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -884,15 +884,9 @@ PHPAPI PHP_FUNCTION(fclose)
zval *res;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_RESOURCE(res)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -980,15 +974,9 @@ PHPAPI PHP_FUNCTION(feof)
zval *res;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_RESOURCE(res)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1012,17 +1000,11 @@ PHPAPI PHP_FUNCTION(fgets)
zend_string *str;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &res, &len) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_RESOURCE(res)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(len)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1184,18 +1166,12 @@ PHPAPI PHP_FUNCTION(fwrite)
zend_long maxlen = 0;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &res, &input, &inputlen, &maxlen) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_RESOURCE(res)
Z_PARAM_STRING(input, inputlen)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(maxlen)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
if (ZEND_NUM_ARGS() == 2) {
num_bytes = inputlen;
@@ -1225,15 +1201,9 @@ PHPAPI PHP_FUNCTION(fflush)
int ret;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_RESOURCE(res)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1252,15 +1222,9 @@ PHPAPI PHP_FUNCTION(rewind)
zval *res;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_RESOURCE(res)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1279,15 +1243,9 @@ PHPAPI PHP_FUNCTION(ftell)
zend_long ret;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_RESOURCE(res)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1307,18 +1265,12 @@ PHPAPI PHP_FUNCTION(fseek)
zend_long offset, whence = SEEK_SET;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|l", &res, &offset, &whence) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_RESOURCE(res)
Z_PARAM_LONG(offset)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(whence)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1802,16 +1754,10 @@ PHPAPI PHP_FUNCTION(fread)
zend_long len;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &res, &len) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_RESOURCE(res)
Z_PARAM_LONG(len)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -2356,15 +2302,9 @@ PHP_FUNCTION(realpath)
size_t filename_len;
char resolved_path_buff[MAXPATHLEN];
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_PATH(filename, filename_len)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (VCWD_REALPATH(filename, resolved_path_buff)) {
if (php_check_open_basedir(resolved_path_buff)) {
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index f6bd99c474..650ab0e893 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -1076,20 +1076,7 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ
/* another quickie macro to make defining similar functions easier */
/* {{{ FileFunction(name, funcnum) */
-#ifndef FAST_ZPP
-# define FileFunction(name, funcnum) \
-void name(INTERNAL_FUNCTION_PARAMETERS) { \
- char *filename; \
- size_t filename_len; \
- \
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) { \
- return; \
- } \
- \
- php_stat(filename, (php_stat_len) filename_len, funcnum, return_value); \
-}
-#else
-# define FileFunction(name, funcnum) \
+#define FileFunction(name, funcnum) \
void name(INTERNAL_FUNCTION_PARAMETERS) { \
char *filename; \
size_t filename_len; \
@@ -1100,7 +1087,6 @@ void name(INTERNAL_FUNCTION_PARAMETERS) { \
\
php_stat(filename, (php_stat_len) filename_len, funcnum, return_value); \
}
-#endif
/* }}} */
/* {{{ proto int fileperms(string filename)
diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c
index 502de05cb2..18829fcba4 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -395,15 +395,9 @@ php_formatted_print(zend_execute_data *execute_data, int use_array, int format_o
int always_sign;
size_t format_len;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argc) == FAILURE) {
- return NULL;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, -1)
Z_PARAM_VARIADIC('+', args, argc)
ZEND_PARSE_PARAMETERS_END_EX(return NULL);
-#endif
/* verify the number of args */
if ((use_array && argc != (2 + format_offset))
diff --git a/ext/standard/html.c b/ext/standard/html.c
index ceb4f7c218..090b4de4f0 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -1449,11 +1449,6 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all)
zend_string *replaced;
zend_bool double_encode = 1;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|lS!b", &str, &flags, &hint_charset, &double_encode) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 4)
Z_PARAM_STR(str)
Z_PARAM_OPTIONAL
@@ -1461,7 +1456,6 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all)
Z_PARAM_STR_EX(hint_charset, 1, 0)
Z_PARAM_BOOL(double_encode);
ZEND_PARSE_PARAMETERS_END();
-#endif
if (!hint_charset) {
default_charset = get_default_charset();
@@ -1531,19 +1525,12 @@ PHP_FUNCTION(html_entity_decode)
zend_long quote_style = ENT_COMPAT;
zend_string *replaced;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|lS", &str,
- &quote_style, &hint_charset) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 3)
Z_PARAM_STR(str)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(quote_style)
Z_PARAM_STR(hint_charset)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (!hint_charset) {
default_charset = get_default_charset();
diff --git a/ext/standard/math.c b/ext/standard/math.c
index ebfee8ead8..ac776104b5 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -302,15 +302,9 @@ PHP_FUNCTION(abs)
{
zval *value;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &value) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ZVAL(value)
ZEND_PARSE_PARAMETERS_END();
-#endif
convert_scalar_to_number_ex(value);
@@ -333,15 +327,9 @@ PHP_FUNCTION(ceil)
{
zval *value;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &value) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ZVAL(value)
ZEND_PARSE_PARAMETERS_END();
-#endif
convert_scalar_to_number_ex(value);
@@ -360,15 +348,9 @@ PHP_FUNCTION(floor)
{
zval *value;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &value) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ZVAL(value)
ZEND_PARSE_PARAMETERS_END();
-#endif
convert_scalar_to_number_ex(value);
@@ -435,15 +417,9 @@ PHP_FUNCTION(sin)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(sin(num));
}
/* }}} */
@@ -454,15 +430,9 @@ PHP_FUNCTION(cos)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(cos(num));
}
/* }}} */
@@ -473,15 +443,9 @@ PHP_FUNCTION(tan)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(tan(num));
}
/* }}} */
@@ -492,15 +456,9 @@ PHP_FUNCTION(asin)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(asin(num));
}
/* }}} */
@@ -511,15 +469,9 @@ PHP_FUNCTION(acos)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(acos(num));
}
/* }}} */
@@ -530,15 +482,9 @@ PHP_FUNCTION(atan)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(atan(num));
}
/* }}} */
@@ -549,16 +495,10 @@ PHP_FUNCTION(atan2)
{
double num1, num2;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "dd", &num1, &num2) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_DOUBLE(num1)
Z_PARAM_DOUBLE(num2)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(atan2(num1, num2));
}
/* }}} */
@@ -569,15 +509,9 @@ PHP_FUNCTION(sinh)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(sinh(num));
}
/* }}} */
@@ -588,15 +522,9 @@ PHP_FUNCTION(cosh)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(cosh(num));
}
/* }}} */
@@ -607,15 +535,9 @@ PHP_FUNCTION(tanh)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(tanh(num));
}
/* }}} */
@@ -626,15 +548,9 @@ PHP_FUNCTION(asinh)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(php_asinh(num));
}
/* }}} */
@@ -645,15 +561,9 @@ PHP_FUNCTION(acosh)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(php_acosh(num));
}
/* }}} */
@@ -664,15 +574,9 @@ PHP_FUNCTION(atanh)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(php_atanh(num));
}
/* }}} */
@@ -691,15 +595,9 @@ PHP_FUNCTION(is_finite)
{
double dval;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &dval) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(dval)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_BOOL(zend_finite(dval));
}
/* }}} */
@@ -710,15 +608,9 @@ PHP_FUNCTION(is_infinite)
{
double dval;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &dval) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(dval)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_BOOL(zend_isinf(dval));
}
/* }}} */
@@ -729,15 +621,9 @@ PHP_FUNCTION(is_nan)
{
double dval;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &dval) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(dval)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_BOOL(zend_isnan(dval));
}
/* }}} */
@@ -762,15 +648,9 @@ PHP_FUNCTION(exp)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(exp(num));
}
@@ -786,15 +666,9 @@ PHP_FUNCTION(expm1)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(php_expm1(num));
}
@@ -810,15 +684,9 @@ PHP_FUNCTION(log1p)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(php_log1p(num));
}
@@ -830,17 +698,11 @@ PHP_FUNCTION(log)
{
double num, base = 0;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d|d", &num, &base) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_DOUBLE(num)
Z_PARAM_OPTIONAL
Z_PARAM_DOUBLE(base)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (ZEND_NUM_ARGS() == 1) {
RETURN_DOUBLE(log(num));
@@ -875,15 +737,9 @@ PHP_FUNCTION(log10)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(log10(num));
}
@@ -895,15 +751,9 @@ PHP_FUNCTION(sqrt)
{
double num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(sqrt(num));
}
@@ -915,16 +765,10 @@ PHP_FUNCTION(hypot)
{
double num1, num2;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "dd", &num1, &num2) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_DOUBLE(num1)
Z_PARAM_DOUBLE(num2)
ZEND_PARSE_PARAMETERS_END();
-#endif
#if HAVE_HYPOT
RETURN_DOUBLE(hypot(num1, num2));
@@ -942,15 +786,9 @@ PHP_FUNCTION(deg2rad)
{
double deg;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &deg) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(deg)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE((deg / 180.0) * M_PI);
}
/* }}} */
@@ -961,15 +799,9 @@ PHP_FUNCTION(rad2deg)
{
double rad;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &rad) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_DOUBLE(rad)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE((rad / M_PI) * 180);
}
@@ -1407,11 +1239,6 @@ PHP_FUNCTION(number_format)
char thousand_sep_chr = ',', dec_point_chr = '.';
size_t thousand_sep_len = 0, dec_point_len = 0;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "d|ls!s!", &num, &dec, &dec_point, &dec_point_len, &thousand_sep, &thousand_sep_len) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 4)
Z_PARAM_DOUBLE(num)
Z_PARAM_OPTIONAL
@@ -1419,7 +1246,6 @@ PHP_FUNCTION(number_format)
Z_PARAM_STRING_EX(dec_point, dec_point_len, 1, 0)
Z_PARAM_STRING_EX(thousand_sep, thousand_sep_len, 1, 0)
ZEND_PARSE_PARAMETERS_END();
-#endif
switch(ZEND_NUM_ARGS()) {
case 1:
@@ -1455,16 +1281,10 @@ PHP_FUNCTION(fmod)
{
double num1, num2;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "dd", &num1, &num2) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_DOUBLE(num1)
Z_PARAM_DOUBLE(num2)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_DOUBLE(fmod(num1, num2));
}
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index f76769c27c..0f2c9bf89c 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -247,18 +247,12 @@ PHP_FUNCTION(stream_socket_accept)
zval *zstream;
zend_string *errstr = NULL;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|dz/", &zstream, &timeout, &zpeername) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 3)
Z_PARAM_RESOURCE(zstream)
Z_PARAM_OPTIONAL
Z_PARAM_DOUBLE(timeout)
Z_PARAM_ZVAL_EX(zpeername, 0, 1)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
php_stream_from_zval(stream, zstream);
@@ -306,16 +300,10 @@ PHP_FUNCTION(stream_socket_get_name)
zend_bool want_peer;
zend_string *name = NULL;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rb", &zstream, &want_peer) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_RESOURCE(zstream)
Z_PARAM_BOOL(want_peer)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
php_stream_from_zval(stream, zstream);
@@ -493,15 +481,9 @@ PHP_FUNCTION(stream_get_meta_data)
zval *zstream;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zstream) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_RESOURCE(zstream)
ZEND_PARSE_PARAMETERS_END();
-#endif
php_stream_from_zval(stream, zstream);
@@ -746,11 +728,6 @@ PHP_FUNCTION(stream_select)
zend_bool secnull;
int set_count, max_set_count = 0;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/!a/!a/!l!|l", &r_array, &w_array, &e_array, &sec, &secnull, &usec) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(4, 5)
Z_PARAM_ARRAY_EX(r_array, 1, 1)
Z_PARAM_ARRAY_EX(w_array, 1, 1)
@@ -759,7 +736,6 @@ PHP_FUNCTION(stream_select)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(usec)
ZEND_PARSE_PARAMETERS_END();
-#endif
FD_ZERO(&rfds);
FD_ZERO(&wfds);
@@ -965,15 +941,9 @@ PHP_FUNCTION(stream_context_get_options)
zval *zcontext;
php_stream_context *context;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zcontext) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_RESOURCE(zcontext)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
context = decode_context_param(zcontext);
if (!context) {
@@ -995,16 +965,10 @@ PHP_FUNCTION(stream_context_set_option)
if (ZEND_NUM_ARGS() == 2) {
zval *options;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &zcontext, &options) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_RESOURCE(zcontext)
Z_PARAM_ARRAY(options)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
/* figure out where the context is coming from exactly */
if (!(context = decode_context_param(zcontext))) {
@@ -1018,18 +982,12 @@ PHP_FUNCTION(stream_context_set_option)
char *wrappername, *optionname;
size_t wrapperlen, optionlen;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rssz", &zcontext, &wrappername, &wrapperlen, &optionname, &optionlen, &zvalue) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(4, 4)
Z_PARAM_RESOURCE(zcontext)
Z_PARAM_STRING(wrappername, wrapperlen)
Z_PARAM_STRING(optionname, optionlen)
Z_PARAM_ZVAL(zvalue)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
/* figure out where the context is coming from exactly */
if (!(context = decode_context_param(zcontext))) {
@@ -1049,16 +1007,10 @@ PHP_FUNCTION(stream_context_set_params)
zval *params, *zcontext;
php_stream_context *context;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &zcontext, &params) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_RESOURCE(zcontext)
Z_PARAM_ARRAY(params)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
context = decode_context_param(zcontext);
if (!context) {
@@ -1077,15 +1029,9 @@ PHP_FUNCTION(stream_context_get_params)
zval *zcontext;
php_stream_context *context;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zcontext) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_RESOURCE(zcontext)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
context = decode_context_param(zcontext);
if (!context) {
@@ -1341,16 +1287,10 @@ PHP_FUNCTION(stream_set_blocking)
zend_bool block;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rb", &zstream, &block) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_RESOURCE(zstream)
Z_PARAM_BOOL(block)
ZEND_PARSE_PARAMETERS_END();
-#endif
php_stream_from_zval(stream, zstream);
@@ -1511,11 +1451,6 @@ PHP_FUNCTION(stream_socket_enable_crypto)
zend_bool enable, cryptokindnull;
int ret;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rb|l!r", &zstream, &enable, &cryptokind, &cryptokindnull, &zsessstream) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 4)
Z_PARAM_RESOURCE(zstream)
Z_PARAM_BOOL(enable)
@@ -1523,7 +1458,6 @@ PHP_FUNCTION(stream_socket_enable_crypto)
Z_PARAM_LONG_EX(cryptokind, cryptokindnull, 1, 0)
Z_PARAM_RESOURCE(zsessstream)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
php_stream_from_zval(stream, zstream);
@@ -1648,16 +1582,10 @@ PHP_FUNCTION(stream_socket_shutdown)
zval *zstream;
php_stream *stream;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &zstream, &how) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_RESOURCE(zstream)
Z_PARAM_LONG(how)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
if (how != STREAM_SHUT_RD &&
how != STREAM_SHUT_WR &&
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 11b8c417b4..c3becb9daa 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -898,17 +898,11 @@ static void php_do_trim(INTERNAL_FUNCTION_PARAMETERS, int mode)
zend_string *str;
zend_string *what = NULL;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|S", &str, &what) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STR(str)
Z_PARAM_OPTIONAL
Z_PARAM_STR(what)
ZEND_PARSE_PARAMETERS_END();
-#endif
ZVAL_STR(return_value, php_trim(str, (what ? ZSTR_VAL(what) : NULL), (what ? ZSTR_LEN(what) : 0), mode));
}
@@ -1156,18 +1150,12 @@ PHP_FUNCTION(explode)
zend_long limit = ZEND_LONG_MAX; /* No limit */
zval tmp;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|l", &delim, &str, &limit) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(delim)
Z_PARAM_STR(str)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(limit)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (ZSTR_LEN(delim) == 0) {
php_error_docref(NULL, E_WARNING, "Empty delimiter");
@@ -1286,17 +1274,11 @@ PHP_FUNCTION(implode)
zval *arg1, *arg2 = NULL, *arr;
zend_string *delim;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|z", &arg1, &arg2) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_ZVAL(arg1)
Z_PARAM_OPTIONAL
Z_PARAM_ZVAL(arg2)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (arg2 == NULL) {
if (Z_TYPE_P(arg1) != IS_ARRAY) {
@@ -1337,17 +1319,11 @@ PHP_FUNCTION(strtok)
char *pe;
size_t skipped = 0;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|S", &str, &tok) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STR(str)
Z_PARAM_OPTIONAL
Z_PARAM_STR(tok)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (ZEND_NUM_ARGS() == 1) {
tok = str;
@@ -1464,15 +1440,9 @@ PHP_FUNCTION(strtoupper)
{
zend_string *arg;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &arg) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(arg)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_STR(php_string_toupper(arg));
}
@@ -1533,15 +1503,9 @@ PHP_FUNCTION(strtolower)
{
zend_string *str;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &str) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(str)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_STR(php_string_tolower(str));
}
@@ -1952,18 +1916,12 @@ PHP_FUNCTION(strpos)
char needle_char[2];
zend_long offset = 0;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|l", &haystack, &needle, &offset) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(haystack)
Z_PARAM_ZVAL(needle)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(offset)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) {
php_error_docref(NULL, E_WARNING, "Offset not contained in string");
@@ -2072,18 +2030,12 @@ PHP_FUNCTION(strrpos)
char *p, *e, ord_needle[2];
char *found;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|l", &haystack, &zneedle, &offset) == FAILURE) {
- RETURN_FALSE;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(haystack)
Z_PARAM_ZVAL(zneedle)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(offset)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
if (Z_TYPE_P(zneedle) == IS_STRING) {
needle = Z_STRVAL_P(zneedle);
@@ -2370,18 +2322,12 @@ PHP_FUNCTION(substr)
zend_long l = 0, f;
int argc = ZEND_NUM_ARGS();
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sl|l", &str, &f, &l) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(str)
Z_PARAM_LONG(f)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(l)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (argc > 2) {
if ((l < 0 && (size_t)(-l) > ZSTR_LEN(str))) {
@@ -2748,15 +2694,9 @@ PHP_FUNCTION(ord)
char *str;
size_t str_len;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &str, &str_len) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STRING(str, str_len)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_LONG((unsigned char) str[0]);
}
@@ -2772,15 +2712,9 @@ PHP_FUNCTION(chr)
WRONG_PARAM_COUNT;
}
-#ifndef FAST_ZPP
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "l", &c) == FAILURE) {
- c = 0;
- }
-#else
ZEND_PARSE_PARAMETERS_START_EX(ZEND_PARSE_PARAMS_QUIET, 1, 1)
Z_PARAM_LONG(c)
ZEND_PARSE_PARAMETERS_END_EX(c = 0);
-#endif
c &= 0xff;
if (CG(one_char_string)[c]) {
@@ -2809,15 +2743,9 @@ PHP_FUNCTION(ucfirst)
{
zend_string *str;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &str) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(str)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (!ZSTR_LEN(str)) {
RETURN_EMPTY_STRING();
@@ -2867,17 +2795,11 @@ PHP_FUNCTION(ucwords)
size_t delims_len = 6;
char mask[256];
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|s", &str, &delims, &delims_len) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STR(str)
Z_PARAM_OPTIONAL
Z_PARAM_STRING(delims, delims_len)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (!ZSTR_LEN(str)) {
RETURN_EMPTY_STRING();
@@ -3445,18 +3367,12 @@ PHP_FUNCTION(strtr)
size_t to_len = 0;
int ac = ZEND_NUM_ARGS();
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|s", &str, &from, &to, &to_len) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(str)
Z_PARAM_ZVAL(from)
Z_PARAM_OPTIONAL
Z_PARAM_STRING(to, to_len)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (ac == 2 && Z_TYPE_P(from) != IS_ARRAY) {
php_error_docref(NULL, E_WARNING, "The second argument is not an array");
@@ -3692,15 +3608,9 @@ PHP_FUNCTION(addslashes)
{
zend_string *str;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &str) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(str)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (ZSTR_LEN(str) == 0) {
RETURN_EMPTY_STRING();
@@ -4118,11 +4028,6 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit
zend_long count = 0;
int argc = ZEND_NUM_ARGS();
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "zzz|z/", &search, &replace, &subject, &zcount) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(3, 4)
Z_PARAM_ZVAL(search)
Z_PARAM_ZVAL(replace)
@@ -4130,7 +4035,6 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit
Z_PARAM_OPTIONAL
Z_PARAM_ZVAL_EX(zcount, 0, 1)
ZEND_PARSE_PARAMETERS_END();
-#endif
/* Make sure we're dealing with strings and do the replacement. */
if (Z_TYPE_P(search) != IS_ARRAY) {
@@ -4388,17 +4292,11 @@ PHP_FUNCTION(nl2br)
zend_bool is_xhtml = 1;
zend_string *result;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|b", &str, &is_xhtml) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STR(str)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(is_xhtml)
ZEND_PARSE_PARAMETERS_END();
-#endif
tmp = ZSTR_VAL(str);
end = ZSTR_VAL(str) + ZSTR_LEN(str);
diff --git a/ext/standard/type.c b/ext/standard/type.c
index d6a412f4ec..c94699210e 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -142,17 +142,11 @@ PHP_FUNCTION(intval)
if (ZEND_NUM_ARGS() != 1 && ZEND_NUM_ARGS() != 2) {
WRONG_PARAM_COUNT;
}
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &num, &base) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_ZVAL(num)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(base)
ZEND_PARSE_PARAMETERS_END();
-#endif
if (Z_TYPE_P(num) != IS_STRING) {
RETVAL_LONG(zval_get_long(num));
@@ -196,15 +190,9 @@ PHP_FUNCTION(strval)
{
zval *num;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &num) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ZVAL(num)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETVAL_STR(zval_get_string(num));
}
@@ -214,16 +202,9 @@ static inline void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type)
{
zval *arg;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &arg) == FAILURE) {
- RETURN_FALSE;
- }
- ZVAL_DEREF(arg);
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ZVAL_DEREF(arg)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#endif
if (Z_TYPE_P(arg) == type) {
if (type == IS_OBJECT) {
@@ -330,15 +311,9 @@ PHP_FUNCTION(is_numeric)
{
zval *arg;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &arg) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
-#endif
switch (Z_TYPE_P(arg)) {
case IS_LONG:
@@ -367,15 +342,9 @@ PHP_FUNCTION(is_scalar)
{
zval *arg;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &arg) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
-#endif
switch (Z_TYPE_P(arg)) {
case IS_FALSE:
diff --git a/ext/standard/url.c b/ext/standard/url.c
index 78ca472a2b..687f5b7f41 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -536,15 +536,9 @@ PHP_FUNCTION(urlencode)
{
zend_string *in_str;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &in_str) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(in_str)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_STR(php_url_encode(ZSTR_VAL(in_str), ZSTR_LEN(in_str)));
}
@@ -556,15 +550,9 @@ PHP_FUNCTION(urldecode)
{
zend_string *in_str, *out_str;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &in_str) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(in_str)
ZEND_PARSE_PARAMETERS_END();
-#endif
out_str = zend_string_init(ZSTR_VAL(in_str), ZSTR_LEN(in_str), 0);
ZSTR_LEN(out_str) = php_url_decode(ZSTR_VAL(out_str), ZSTR_LEN(out_str));
@@ -643,15 +631,9 @@ PHP_FUNCTION(rawurlencode)
{
zend_string *in_str;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &in_str) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(in_str)
ZEND_PARSE_PARAMETERS_END();
-#endif
RETURN_STR(php_raw_url_encode(ZSTR_VAL(in_str), ZSTR_LEN(in_str)));
}
@@ -663,15 +645,9 @@ PHP_FUNCTION(rawurldecode)
{
zend_string *in_str, *out_str;
-#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &in_str) == FAILURE) {
- return;
- }
-#else
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(in_str)
ZEND_PARSE_PARAMETERS_END();
-#endif
out_str = zend_string_init(ZSTR_VAL(in_str), ZSTR_LEN(in_str), 0);
ZSTR_LEN(out_str) = php_raw_url_decode(ZSTR_VAL(out_str), ZSTR_LEN(out_str));