summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-06-19 12:55:59 +0300
committerDmitry Stogov <dmitry@zend.com>2017-06-19 12:55:59 +0300
commit9c2a1f52a5f087c70a9e91dc1f43e5718d1bd8b6 (patch)
tree3eb7097ebb986594ae03e54142240fca4b82e5f3 /ext
parent6fe75aad6da55e7ce473109e219fdc80bf3b7a51 (diff)
downloadphp-git-9c2a1f52a5f087c70a9e91dc1f43e5718d1bd8b6.tar.gz
Avoid useless dereferences and separations during paramter passing.
Diffstat (limited to 'ext')
-rw-r--r--ext/ctype/ctype.c2
-rw-r--r--ext/curl/multi.c12
-rw-r--r--ext/curl/share.c2
-rw-r--r--ext/json/json.c2
-rw-r--r--ext/pdo/pdo_dbh.c2
-rw-r--r--ext/pdo/pdo_stmt.c6
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c8
-rw-r--r--ext/posix/posix.c4
-rw-r--r--ext/standard/array.c24
-rw-r--r--ext/standard/assert.c6
-rw-r--r--ext/standard/basic_functions.c10
-rw-r--r--ext/standard/dns.c16
-rw-r--r--ext/standard/exec.c11
-rw-r--r--ext/standard/file.c8
-rw-r--r--ext/standard/filestat.c4
-rw-r--r--ext/standard/fsock.c12
-rw-r--r--ext/standard/head.c8
-rw-r--r--ext/standard/http.c2
-rw-r--r--ext/standard/image.c4
-rw-r--r--ext/standard/math.c20
-rw-r--r--ext/standard/proc_open.c7
-rw-r--r--ext/standard/streamsfuncs.c32
-rw-r--r--ext/standard/string.c35
-rw-r--r--ext/standard/type.c22
-rw-r--r--ext/standard/user_filters.c2
-rw-r--r--ext/standard/var.c4
26 files changed, 131 insertions, 134 deletions
diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c
index f5d7ac35fa..9b8abe6b06 100644
--- a/ext/ctype/ctype.c
+++ b/ext/ctype/ctype.c
@@ -145,7 +145,7 @@ static PHP_MINFO_FUNCTION(ctype)
#define CTYPE(iswhat) \
zval *c, tmp; \
ZEND_PARSE_PARAMETERS_START(1, 1); \
- Z_PARAM_ZVAL_DEREF(c) \
+ Z_PARAM_ZVAL(c) \
ZEND_PARSE_PARAMETERS_END(); \
if (Z_TYPE_P(c) == IS_LONG) { \
if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index 1bb95a2a61..322fd823f4 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -254,7 +254,7 @@ PHP_FUNCTION(curl_multi_exec)
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_RESOURCE(z_mh)
- Z_PARAM_ZVAL_DEREF_EX(z_still_running, 0, 1)
+ Z_PARAM_ZVAL_DEREF(z_still_running)
ZEND_PARSE_PARAMETERS_END();
if ((mh = (php_curlm *)zend_fetch_resource(Z_RES_P(z_mh), le_curl_multi_handle_name, le_curl_multi_handle)) == NULL) {
@@ -277,9 +277,9 @@ PHP_FUNCTION(curl_multi_exec)
}
}
- convert_to_long(z_still_running);
- still_running = Z_LVAL_P(z_still_running);
+ still_running = zval_get_long(z_still_running);
error = curl_multi_perform(mh->multi, &still_running);
+ zval_ptr_dtor(z_still_running);
ZVAL_LONG(z_still_running, still_running);
SAVE_CURLM_ERROR(mh, error);
@@ -314,7 +314,7 @@ PHP_FUNCTION(curl_multi_getcontent)
}
/* }}} */
-/* {{{ proto array curl_multi_info_read(resource mh [, long msgs_in_queue])
+/* {{{ proto array curl_multi_info_read(resource mh [, long &msgs_in_queue])
Get information about the current transfers */
PHP_FUNCTION(curl_multi_info_read)
{
@@ -327,7 +327,7 @@ PHP_FUNCTION(curl_multi_info_read)
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_RESOURCE(z_mh)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(zmsgs_in_queue, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zmsgs_in_queue)
ZEND_PARSE_PARAMETERS_END();
if ((mh = (php_curlm *)zend_fetch_resource(Z_RES_P(z_mh), le_curl_multi_handle_name, le_curl_multi_handle)) == NULL) {
@@ -608,7 +608,7 @@ PHP_FUNCTION(curl_multi_setopt)
ZEND_PARSE_PARAMETERS_START(3,3)
Z_PARAM_RESOURCE(z_mh)
Z_PARAM_LONG(options)
- Z_PARAM_ZVAL_DEREF(zvalue)
+ Z_PARAM_ZVAL(zvalue)
ZEND_PARSE_PARAMETERS_END();
if ((mh = (php_curlm *)zend_fetch_resource(Z_RES_P(z_mh), le_curl_multi_handle_name, le_curl_multi_handle)) == NULL) {
diff --git a/ext/curl/share.c b/ext/curl/share.c
index 4bbeff70db..d5ce75d239 100644
--- a/ext/curl/share.c
+++ b/ext/curl/share.c
@@ -107,7 +107,7 @@ PHP_FUNCTION(curl_share_setopt)
ZEND_PARSE_PARAMETERS_START(3,3)
Z_PARAM_RESOURCE(zid)
Z_PARAM_LONG(options)
- Z_PARAM_ZVAL_DEREF(zvalue)
+ Z_PARAM_ZVAL(zvalue)
ZEND_PARSE_PARAMETERS_END();
if ((sh = (php_curlsh *)zend_fetch_resource(Z_RES_P(zid), le_curl_share_handle_name, le_curl_share_handle)) == NULL) {
diff --git a/ext/json/json.c b/ext/json/json.c
index 9803f48a3a..9c930ee1bc 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -227,7 +227,7 @@ static PHP_FUNCTION(json_encode)
zend_long depth = PHP_JSON_PARSER_DEFAULT_DEPTH;
ZEND_PARSE_PARAMETERS_START(1, 3)
- Z_PARAM_ZVAL_DEREF(parameter)
+ Z_PARAM_ZVAL(parameter)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(options)
Z_PARAM_LONG(depth)
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index cb5f1e1bc3..afca2d1cfb 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -832,7 +832,7 @@ static PHP_METHOD(PDO, setAttribute)
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_LONG(attr)
- Z_PARAM_ZVAL_DEREF(value)
+ Z_PARAM_ZVAL(value)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
PDO_DBH_CLEAR_ERR();
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index d0e3d7a41d..c238ea0fb0 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -1377,8 +1377,8 @@ static PHP_METHOD(PDOStatement, fetchAll)
ZEND_PARSE_PARAMETERS_START(0, 3)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(how)
- Z_PARAM_ZVAL_DEREF(arg2)
- Z_PARAM_ZVAL_DEREF(ctor_args)
+ Z_PARAM_ZVAL(arg2)
+ Z_PARAM_ZVAL(ctor_args)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (!pdo_stmt_verify_mode(stmt, how, 1)) {
@@ -1699,7 +1699,7 @@ static PHP_METHOD(PDOStatement, setAttribute)
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_LONG(attr)
- Z_PARAM_ZVAL_DEREF_EX(value, 1, 0)
+ Z_PARAM_ZVAL_EX(value, 1, 0)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (!stmt->methods->set_attribute) {
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index 1e3e071fef..fed9dbed2f 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -522,7 +522,7 @@ static PHP_METHOD(SQLite, sqliteCreateFunction)
ZEND_PARSE_PARAMETERS_START(2, 4)
Z_PARAM_STRING(func_name, func_name_len)
- Z_PARAM_ZVAL_DEREF(callback)
+ Z_PARAM_ZVAL(callback)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(argc)
Z_PARAM_LONG(flags)
@@ -595,8 +595,8 @@ static PHP_METHOD(SQLite, sqliteCreateAggregate)
ZEND_PARSE_PARAMETERS_START(3, 4)
Z_PARAM_STRING(func_name, func_name_len)
- Z_PARAM_ZVAL_DEREF(step_callback)
- Z_PARAM_ZVAL_DEREF(fini_callback)
+ Z_PARAM_ZVAL(step_callback)
+ Z_PARAM_ZVAL(fini_callback)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(argc)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
@@ -658,7 +658,7 @@ static PHP_METHOD(SQLite, sqliteCreateCollation)
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_STRING(collation_name, collation_name_len)
- Z_PARAM_ZVAL_DEREF(callback)
+ Z_PARAM_ZVAL(callback)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
dbh = Z_PDO_DBH_P(getThis());
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index f8fe406ea3..bb23a5bc29 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -795,7 +795,7 @@ PHP_FUNCTION(posix_ttyname)
#endif
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(z_fd)
+ Z_PARAM_ZVAL(z_fd)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
switch (Z_TYPE_P(z_fd)) {
@@ -840,7 +840,7 @@ PHP_FUNCTION(posix_isatty)
int fd;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(z_fd)
+ Z_PARAM_ZVAL(z_fd)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
switch (Z_TYPE_P(z_fd)) {
diff --git a/ext/standard/array.c b/ext/standard/array.c
index e44f1ed4e7..7055b2c86b 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -1513,7 +1513,7 @@ PHP_FUNCTION(array_walk)
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)
+ Z_PARAM_ZVAL(userdata)
ZEND_PARSE_PARAMETERS_END_EX(
BG(array_walk_fci) = orig_array_walk_fci;
BG(array_walk_fci_cache) = orig_array_walk_fci_cache;
@@ -1543,7 +1543,7 @@ PHP_FUNCTION(array_walk_recursive)
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_DEREF_EX(userdata, 0, 1)
+ Z_PARAM_ZVAL(userdata)
ZEND_PARSE_PARAMETERS_END_EX(
BG(array_walk_fci) = orig_array_walk_fci;
BG(array_walk_fci_cache) = orig_array_walk_fci_cache;
@@ -2470,7 +2470,7 @@ PHP_FUNCTION(extract)
Z_PARAM_ARRAY_EX2(var_array_param, 0, 1, 0)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(extract_type)
- Z_PARAM_ZVAL_EX(prefix, 0, 1)
+ Z_PARAM_ZVAL(prefix)
ZEND_PARSE_PARAMETERS_END();
extract_refs = (extract_type & EXTR_REFS);
@@ -2711,7 +2711,7 @@ PHP_FUNCTION(array_fill_keys)
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_ARRAY(keys)
- Z_PARAM_ZVAL_DEREF(val)
+ Z_PARAM_ZVAL(val)
ZEND_PARSE_PARAMETERS_END();
/* Initialize return array */
@@ -2762,10 +2762,10 @@ PHP_FUNCTION(range)
double step = 1.0;
ZEND_PARSE_PARAMETERS_START(2, 3)
- Z_PARAM_ZVAL_DEREF(zlow)
- Z_PARAM_ZVAL_DEREF(zhigh)
+ Z_PARAM_ZVAL(zlow)
+ Z_PARAM_ZVAL(zhigh)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(zstep)
+ Z_PARAM_ZVAL(zstep)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (zstep) {
@@ -3472,7 +3472,7 @@ PHP_FUNCTION(array_splice)
Z_PARAM_LONG(offset)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(length)
- Z_PARAM_ZVAL_DEREF_EX(repl_array, 0, 1)
+ Z_PARAM_ZVAL(repl_array)
ZEND_PARSE_PARAMETERS_END();
num_in = zend_hash_num_elements(Z_ARRVAL_P(array));
@@ -4164,9 +4164,9 @@ PHP_FUNCTION(array_column)
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_ARRAY_HT(arr_hash)
- Z_PARAM_ZVAL_DEREF_EX(zcolumn, 1, 0)
+ Z_PARAM_ZVAL_EX(zcolumn, 1, 0)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(zkey, 1, 0)
+ Z_PARAM_ZVAL_EX(zkey, 1, 0)
ZEND_PARSE_PARAMETERS_END();
if ((zcolumn && !array_column_param_helper(zcolumn, "column")) ||
@@ -4297,7 +4297,7 @@ PHP_FUNCTION(array_pad)
ZEND_PARSE_PARAMETERS_START(3, 3)
Z_PARAM_ARRAY(input)
Z_PARAM_LONG(pad_size)
- Z_PARAM_ZVAL_DEREF(pad_value)
+ Z_PARAM_ZVAL(pad_value)
ZEND_PARSE_PARAMETERS_END();
/* Do some initial calculations */
@@ -5864,7 +5864,7 @@ PHP_FUNCTION(array_reduce)
Z_PARAM_ARRAY(input)
Z_PARAM_FUNC(fci, fci_cache)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(initial)
+ Z_PARAM_ZVAL(initial)
ZEND_PARSE_PARAMETERS_END();
diff --git a/ext/standard/assert.c b/ext/standard/assert.c
index 850fb824e2..87462185a8 100644
--- a/ext/standard/assert.c
+++ b/ext/standard/assert.c
@@ -158,9 +158,9 @@ PHP_FUNCTION(assert)
}
ZEND_PARSE_PARAMETERS_START(1, 2)
- Z_PARAM_ZVAL_DEREF(assertion)
+ Z_PARAM_ZVAL(assertion)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(description)
+ Z_PARAM_ZVAL(description)
ZEND_PARSE_PARAMETERS_END();
if (Z_TYPE_P(assertion) == IS_STRING) {
@@ -297,7 +297,7 @@ PHP_FUNCTION(assert_options)
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_LONG(what)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(value)
+ Z_PARAM_ZVAL(value)
ZEND_PARSE_PARAMETERS_END();
switch (what) {
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 79d08e4efc..8f73153bba 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -4306,12 +4306,12 @@ PHP_FUNCTION(getopt)
Z_PARAM_STRING(options, options_len)
Z_PARAM_OPTIONAL
Z_PARAM_ARRAY(p_longopts)
- Z_PARAM_ZVAL_DEREF_EX(zoptind, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zoptind)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
/* Init zoptind to 1 */
if (zoptind) {
- zval_dtor(zoptind);
+ zval_ptr_dtor(zoptind);
ZVAL_LONG(zoptind, 1);
}
@@ -5278,7 +5278,7 @@ PHP_FUNCTION(highlight_string)
int old_error_reporting = EG(error_reporting);
ZEND_PARSE_PARAMETERS_START(1, 2)
- Z_PARAM_ZVAL_DEREF(expr)
+ Z_PARAM_ZVAL(expr)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(i)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
@@ -5572,7 +5572,7 @@ PHP_FUNCTION(print_r)
zend_bool do_return = 0;
ZEND_PARSE_PARAMETERS_START(1, 2)
- Z_PARAM_ZVAL_DEREF(var)
+ Z_PARAM_ZVAL(var)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(do_return)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
@@ -5805,7 +5805,7 @@ PHP_FUNCTION(unregister_tick_function)
user_tick_function_entry tick_fe;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF_EX(function, 0, 1)
+ Z_PARAM_ZVAL(function)
ZEND_PARSE_PARAMETERS_END();
if (!BG(user_tick_functions)) {
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 93cc2f8f90..58f214f2c7 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -808,17 +808,17 @@ PHP_FUNCTION(dns_get_record)
Z_PARAM_STRING(hostname, hostname_len)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(type_param)
- Z_PARAM_ZVAL_DEREF_EX(authns, 1, 1)
- Z_PARAM_ZVAL_DEREF_EX(addtl, 1, 1)
+ Z_PARAM_ZVAL_DEREF_EX(authns, 1, 0)
+ Z_PARAM_ZVAL_DEREF_EX(addtl, 1, 0)
Z_PARAM_BOOL(raw)
ZEND_PARSE_PARAMETERS_END();
if (authns) {
- zval_dtor(authns);
+ zval_ptr_dtor(authns);
array_init(authns);
}
if (addtl) {
- zval_dtor(addtl);
+ zval_ptr_dtor(addtl);
array_init(addtl);
}
@@ -1041,16 +1041,16 @@ PHP_FUNCTION(dns_get_mx)
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STRING(hostname, hostname_len)
- Z_PARAM_ZVAL_DEREF_EX(mx_list, 0, 1)
+ Z_PARAM_ZVAL_DEREF(mx_list)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(weight_list, 0, 1)
+ Z_PARAM_ZVAL_DEREF(weight_list)
ZEND_PARSE_PARAMETERS_END();
- zval_dtor(mx_list);
+ zval_ptr_dtor(mx_list);
array_init(mx_list);
if (weight_list) {
- zval_dtor(weight_list);
+ zval_ptr_dtor(weight_list);
array_init(weight_list);
}
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 08f51cf3b5..1e70021674 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -217,9 +217,9 @@ static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
Z_PARAM_STRING(cmd, cmd_len)
Z_PARAM_OPTIONAL
if (!mode) {
- Z_PARAM_ZVAL_DEREF_EX(ret_array, 0, 1)
+ Z_PARAM_ZVAL_DEREF(ret_array)
}
- Z_PARAM_ZVAL_DEREF_EX(ret_code, 0, 1)
+ Z_PARAM_ZVAL_DEREF(ret_code)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (!cmd_len) {
@@ -235,13 +235,16 @@ static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
ret = php_exec(mode, cmd, NULL, return_value);
} else {
if (Z_TYPE_P(ret_array) != IS_ARRAY) {
- zval_dtor(ret_array);
+ zval_ptr_dtor(ret_array);
array_init(ret_array);
+ } else if (Z_REFCOUNT_P(ret_array) > 1) {
+ zval_ptr_dtor(ret_array);
+ ZVAL_ARR(ret_array, zend_array_dup(Z_ARR_P(ret_array)));
}
ret = php_exec(2, cmd, ret_array, return_value);
}
if (ret_code) {
- zval_dtor(ret_code);
+ zval_ptr_dtor(ret_code);
ZVAL_LONG(ret_code, ret);
}
}
diff --git a/ext/standard/file.c b/ext/standard/file.c
index c2711225bd..d82c2c513e 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -341,7 +341,7 @@ PHP_FUNCTION(flock)
Z_PARAM_RESOURCE(res)
Z_PARAM_LONG(operation)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(wouldblock, 0, 1)
+ Z_PARAM_ZVAL_DEREF(wouldblock)
ZEND_PARSE_PARAMETERS_END();
PHP_STREAM_TO_ZVAL(stream, res);
@@ -353,7 +353,7 @@ PHP_FUNCTION(flock)
}
if (wouldblock) {
- zval_dtor(wouldblock);
+ zval_ptr_dtor(wouldblock);
ZVAL_LONG(wouldblock, 0);
}
@@ -591,7 +591,7 @@ PHP_FUNCTION(file_put_contents)
ZEND_PARSE_PARAMETERS_START(2, 4)
Z_PARAM_PATH(filename, filename_len)
- Z_PARAM_ZVAL_DEREF_EX(data, 0, 1)
+ Z_PARAM_ZVAL(data)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(flags)
Z_PARAM_RESOURCE_EX(zcontext, 1, 0)
@@ -2008,7 +2008,7 @@ PHP_FUNCTION(fgetcsv)
ZEND_PARSE_PARAMETERS_START(1, 5)
Z_PARAM_RESOURCE(fd)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(len_zv)
+ Z_PARAM_ZVAL(len_zv)
Z_PARAM_STRING(delimiter_str, delimiter_str_len)
Z_PARAM_STRING(enclosure_str, enclosure_str_len)
Z_PARAM_STRING(escape_str, escape_str_len)
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index f51892b510..b0d6a9813f 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -339,7 +339,7 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_PATH(filename, filename_len)
- Z_PARAM_ZVAL_DEREF_EX(group, 0, 1)
+ Z_PARAM_ZVAL(group)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
wrapper = php_stream_locate_url_wrapper(filename, NULL, 0);
@@ -475,7 +475,7 @@ static void php_do_chown(INTERNAL_FUNCTION_PARAMETERS, int do_lchown) /* {{{ */
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_PATH(filename, filename_len)
- Z_PARAM_ZVAL_DEREF_EX(user, 0, 1)
+ Z_PARAM_ZVAL(user)
ZEND_PARSE_PARAMETERS_END();
wrapper = php_stream_locate_url_wrapper(filename, NULL, 0);
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index e29e6bf0a8..1605a84398 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -55,8 +55,8 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
Z_PARAM_STRING(host, host_len)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(port)
- Z_PARAM_ZVAL_DEREF_EX(zerrno, 0, 1)
- Z_PARAM_ZVAL_DEREF_EX(zerrstr, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zerrno)
+ Z_PARAM_ZVAL_DEREF(zerrstr)
Z_PARAM_DOUBLE(timeout)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
@@ -82,11 +82,11 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
tv.tv_usec = conv % 1000000;
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, 0);
}
if (zerrstr) {
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_EMPTY_STRING(zerrstr);
}
@@ -106,12 +106,12 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (stream == NULL) {
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, err);
}
if (zerrstr && errstr) {
/* no need to dup; we need to efree buf anyway */
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_STR(zerrstr, errstr);
} else if (!zerrstr && errstr) {
zend_string_release(errstr);
diff --git a/ext/standard/head.c b/ext/standard/head.c
index b8632c70ed..81d229d4c8 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -258,8 +258,8 @@ PHP_FUNCTION(headers_sent)
ZEND_PARSE_PARAMETERS_START(0, 2)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(arg1, 0, 1)
- Z_PARAM_ZVAL_DEREF_EX(arg2, 0, 1)
+ Z_PARAM_ZVAL_DEREF(arg1)
+ Z_PARAM_ZVAL_DEREF(arg2)
ZEND_PARSE_PARAMETERS_END();
if (SG(headers_sent)) {
@@ -269,10 +269,10 @@ PHP_FUNCTION(headers_sent)
switch(ZEND_NUM_ARGS()) {
case 2:
- zval_dtor(arg2);
+ zval_ptr_dtor(arg2);
ZVAL_LONG(arg2, line);
case 1:
- zval_dtor(arg1);
+ zval_ptr_dtor(arg1);
if (file) {
ZVAL_STRING(arg1, file);
} else {
diff --git a/ext/standard/http.c b/ext/standard/http.c
index 9a8f7fd20c..e270342c7b 100644
--- a/ext/standard/http.c
+++ b/ext/standard/http.c
@@ -233,7 +233,7 @@ PHP_FUNCTION(http_build_query)
zend_long enc_type = PHP_QUERY_RFC1738;
ZEND_PARSE_PARAMETERS_START(1, 4)
- Z_PARAM_ZVAL_DEREF(formdata)
+ Z_PARAM_ZVAL(formdata)
Z_PARAM_OPTIONAL
Z_PARAM_STRING(prefix, prefix_len)
Z_PARAM_STRING(arg_sep, arg_sep_len)
diff --git a/ext/standard/image.c b/ext/standard/image.c
index d15fd3323a..9deb5a8a74 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -1475,11 +1475,11 @@ static void php_getimagesize_from_any(INTERNAL_FUNCTION_PARAMETERS, int mode) {
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STRING(input, input_len)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(info, 0, 1)
+ Z_PARAM_ZVAL_DEREF(info)
ZEND_PARSE_PARAMETERS_END();
if (argc == 2) {
- zval_dtor(info);
+ zval_ptr_dtor(info);
array_init(info);
}
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 794128be6c..6f7bede332 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -363,7 +363,7 @@ PHP_FUNCTION(round)
double return_val;
ZEND_PARSE_PARAMETERS_START(1, 3)
- Z_PARAM_ZVAL_DEREF(value)
+ Z_PARAM_ZVAL(value)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(precision)
Z_PARAM_LONG(mode)
@@ -627,8 +627,8 @@ PHP_FUNCTION(pow)
zval *zbase, *zexp;
ZEND_PARSE_PARAMETERS_START(2, 2)
- Z_PARAM_ZVAL_DEREF_EX(zbase, 0, 1)
- Z_PARAM_ZVAL_DEREF_EX(zexp, 0, 1)
+ Z_PARAM_ZVAL(zbase)
+ Z_PARAM_ZVAL(zexp)
ZEND_PARSE_PARAMETERS_END();
pow_function(return_value, zbase, zexp);
@@ -983,7 +983,7 @@ PHP_FUNCTION(bindec)
zval *arg;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_string_ex(arg);
@@ -1000,7 +1000,7 @@ PHP_FUNCTION(hexdec)
zval *arg;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_string_ex(arg);
@@ -1017,7 +1017,7 @@ PHP_FUNCTION(octdec)
zval *arg;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_string_ex(arg);
@@ -1035,7 +1035,7 @@ PHP_FUNCTION(decbin)
zend_string *result;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_long_ex(arg);
@@ -1052,7 +1052,7 @@ PHP_FUNCTION(decoct)
zend_string *result;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_long_ex(arg);
@@ -1069,7 +1069,7 @@ PHP_FUNCTION(dechex)
zend_string *result;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_long_ex(arg);
@@ -1087,7 +1087,7 @@ PHP_FUNCTION(base_convert)
zend_string *result;
ZEND_PARSE_PARAMETERS_START(3, 3)
- Z_PARAM_ZVAL_DEREF(number)
+ Z_PARAM_ZVAL(number)
Z_PARAM_LONG(frombase)
Z_PARAM_LONG(tobase)
ZEND_PARSE_PARAMETERS_END();
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c
index 6d048091c5..539d2c5b69 100644
--- a/ext/standard/proc_open.c
+++ b/ext/standard/proc_open.c
@@ -448,7 +448,7 @@ PHP_FUNCTION(proc_open)
ZEND_PARSE_PARAMETERS_START(3, 6)
Z_PARAM_STRING(command, command_len)
Z_PARAM_ARRAY(descriptorspec)
- Z_PARAM_ZVAL_DEREF_EX(pipes, 0, 1)
+ Z_PARAM_ZVAL_DEREF(pipes)
Z_PARAM_OPTIONAL
Z_PARAM_STRING_EX(cwd, cwd_len, 1, 0)
Z_PARAM_ARRAY_EX(environment, 1, 0)
@@ -874,10 +874,7 @@ PHP_FUNCTION(proc_open)
#endif
proc->env = env;
- if (pipes != NULL) {
- zval_dtor(pipes);
- }
-
+ zval_ptr_dtor(pipes);
array_init(pipes);
#if PHP_CAN_DO_PTS
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index 783b354984..475fb060be 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -109,8 +109,8 @@ PHP_FUNCTION(stream_socket_client)
ZEND_PARSE_PARAMETERS_START(1, 6)
Z_PARAM_STR(host)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(zerrno, 0, 1)
- Z_PARAM_ZVAL_DEREF_EX(zerrstr, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zerrno)
+ Z_PARAM_ZVAL_DEREF(zerrstr)
Z_PARAM_DOUBLE(timeout)
Z_PARAM_LONG(flags)
Z_PARAM_RESOURCE(zcontext)
@@ -132,11 +132,11 @@ PHP_FUNCTION(stream_socket_client)
tv.tv_usec = conv % 1000000;
#endif
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, 0);
}
if (zerrstr) {
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_EMPTY_STRING(zerrstr);
}
@@ -160,11 +160,11 @@ PHP_FUNCTION(stream_socket_client)
if (stream == NULL) {
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, err);
}
if (zerrstr && errstr) {
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_STR(zerrstr, errstr);
} else if (errstr) {
zend_string_release(errstr);
@@ -199,8 +199,8 @@ PHP_FUNCTION(stream_socket_server)
ZEND_PARSE_PARAMETERS_START(1, 5)
Z_PARAM_STRING(host, host_len)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(zerrno, 0, 1)
- Z_PARAM_ZVAL_DEREF_EX(zerrstr, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zerrno)
+ Z_PARAM_ZVAL_DEREF(zerrstr)
Z_PARAM_LONG(flags)
Z_PARAM_RESOURCE(zcontext)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
@@ -212,11 +212,11 @@ PHP_FUNCTION(stream_socket_server)
}
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, 0);
}
if (zerrstr) {
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_EMPTY_STRING(zerrstr);
}
@@ -230,11 +230,11 @@ PHP_FUNCTION(stream_socket_server)
if (stream == NULL) {
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, err);
}
if (zerrstr && errstr) {
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_STR(zerrstr, errstr);
} else if (errstr) {
zend_string_release(errstr);
@@ -389,13 +389,13 @@ PHP_FUNCTION(stream_socket_recvfrom)
Z_PARAM_LONG(to_read)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(flags)
- Z_PARAM_ZVAL_DEREF_EX(zremote, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zremote)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
php_stream_from_zval(stream, zstream);
if (zremote) {
- zval_dtor(zremote);
+ zval_ptr_dtor(zremote);
ZVAL_NULL(zremote);
}
@@ -1176,7 +1176,7 @@ static void apply_filter_to_stream(int append, INTERNAL_FUNCTION_PARAMETERS)
Z_PARAM_STRING(filtername, filternamelen)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(read_write)
- Z_PARAM_ZVAL_DEREF(filterparams)
+ Z_PARAM_ZVAL(filterparams)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
php_stream_from_zval(stream, zstream);
@@ -1577,7 +1577,7 @@ PHP_FUNCTION(stream_is_local)
php_stream_wrapper *wrapper = NULL;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(zstream)
+ Z_PARAM_ZVAL(zstream)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (Z_TYPE_P(zstream) == IS_RESOURCE) {
diff --git a/ext/standard/string.c b/ext/standard/string.c
index b740779b66..6ffc2ae2bb 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -1851,7 +1851,7 @@ PHP_FUNCTION(stristr)
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(haystack)
- Z_PARAM_ZVAL_DEREF(needle)
+ Z_PARAM_ZVAL(needle)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(part)
ZEND_PARSE_PARAMETERS_END();
@@ -1906,7 +1906,7 @@ PHP_FUNCTION(strstr)
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(haystack)
- Z_PARAM_ZVAL_DEREF(needle)
+ Z_PARAM_ZVAL(needle)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(part)
ZEND_PARSE_PARAMETERS_END();
@@ -2011,7 +2011,7 @@ PHP_FUNCTION(stripos)
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(haystack)
- Z_PARAM_ZVAL_DEREF(needle)
+ Z_PARAM_ZVAL(needle)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(offset)
ZEND_PARSE_PARAMETERS_END();
@@ -2142,7 +2142,7 @@ PHP_FUNCTION(strripos)
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(haystack)
- Z_PARAM_ZVAL_DEREF(zneedle)
+ Z_PARAM_ZVAL(zneedle)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(offset)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
@@ -2248,7 +2248,7 @@ PHP_FUNCTION(strrchr)
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_STR(haystack)
- Z_PARAM_ZVAL_DEREF(needle)
+ Z_PARAM_ZVAL(needle)
ZEND_PARSE_PARAMETERS_END();
if (Z_TYPE_P(needle) == IS_STRING) {
@@ -2457,11 +2457,11 @@ PHP_FUNCTION(substr_replace)
zval *tmp_str = NULL, *tmp_from = NULL, *tmp_repl = NULL, *tmp_len= NULL;
ZEND_PARSE_PARAMETERS_START(3, 4)
- Z_PARAM_ZVAL_DEREF(str)
- Z_PARAM_ZVAL_DEREF(repl)
- Z_PARAM_ZVAL_DEREF(from)
+ Z_PARAM_ZVAL(str)
+ Z_PARAM_ZVAL(repl)
+ Z_PARAM_ZVAL(from)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(len, 0, 1)
+ Z_PARAM_ZVAL(len)
ZEND_PARSE_PARAMETERS_END();
if (Z_TYPE_P(str) != IS_ARRAY) {
@@ -3588,7 +3588,7 @@ PHP_FUNCTION(similar_text)
Z_PARAM_STR(t1)
Z_PARAM_STR(t2)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(percent, 0, 1)
+ Z_PARAM_ZVAL_DEREF(percent)
ZEND_PARSE_PARAMETERS_END();
if (ac > 2) {
@@ -4449,7 +4449,7 @@ PHP_FUNCTION(strip_tags)
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STR(str)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(allow)
+ Z_PARAM_ZVAL(allow)
ZEND_PARSE_PARAMETERS_END();
/* To maintain a certain BC, we allow anything for the second parameter and return original string */
@@ -4556,7 +4556,7 @@ PHP_FUNCTION(setlocale)
}
/* }}} */
-/* {{{ proto void parse_str(string encoded_string [, array result])
+/* {{{ proto void parse_str(string encoded_string [, array &result])
Parses GET/POST/COOKIE data and sets global variables */
PHP_FUNCTION(parse_str)
{
@@ -4568,7 +4568,7 @@ PHP_FUNCTION(parse_str)
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STRING(arg, arglen)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(arrayArg, 0, 1)
+ Z_PARAM_ZVAL_DEREF(arrayArg)
ZEND_PARSE_PARAMETERS_END();
res = estrndup(arg, arglen);
@@ -4590,13 +4590,10 @@ PHP_FUNCTION(parse_str)
zend_throw_error(NULL, "Cannot re-assign $this");
}
} else {
- zval ret;
-
/* Clear out the array that was passed in. */
- zval_dtor(arrayArg);
- array_init(&ret);
- sapi_module.treat_data(PARSE_STRING, res, &ret);
- ZVAL_COPY_VALUE(arrayArg, &ret);
+ zval_ptr_dtor(arrayArg);
+ array_init(arrayArg);
+ sapi_module.treat_data(PARSE_STRING, res, arrayArg);
}
}
/* }}} */
diff --git a/ext/standard/type.c b/ext/standard/type.c
index 1df5a63ecc..e290c9ddd5 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -29,7 +29,7 @@ PHP_FUNCTION(gettype)
zend_string *type;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
type = zend_zval_get_type(arg);
@@ -41,7 +41,7 @@ PHP_FUNCTION(gettype)
}
/* }}} */
-/* {{{ proto bool settype(mixed var, string type)
+/* {{{ proto bool settype(mixed &var, string type)
Set the type of the variable */
PHP_FUNCTION(settype)
{
@@ -155,7 +155,7 @@ PHP_FUNCTION(floatval)
zval *num;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(num)
+ Z_PARAM_ZVAL(num)
ZEND_PARSE_PARAMETERS_END();
RETURN_DOUBLE(zval_get_double(num));
@@ -169,7 +169,7 @@ PHP_FUNCTION(boolval)
zval *val;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(val)
+ Z_PARAM_ZVAL(val)
ZEND_PARSE_PARAMETERS_END();
RETURN_BOOL(zend_is_true(val));
@@ -195,7 +195,7 @@ static inline void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type)
zval *arg;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (Z_TYPE_P(arg) == type) {
@@ -238,7 +238,7 @@ PHP_FUNCTION(is_bool)
zval *arg;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
RETURN_BOOL(Z_TYPE_P(arg) == IS_FALSE || Z_TYPE_P(arg) == IS_TRUE);
@@ -347,7 +347,7 @@ PHP_FUNCTION(is_scalar)
}
/* }}} */
-/* {{{ proto bool is_callable(mixed var [, bool syntax_only [, string callable_name]])
+/* {{{ proto bool is_callable(mixed var [, bool syntax_only [, string &callable_name]])
Returns true if var is callable. */
PHP_FUNCTION(is_callable)
{
@@ -359,10 +359,10 @@ PHP_FUNCTION(is_callable)
int check_flags = 0;
ZEND_PARSE_PARAMETERS_START(1, 3)
- Z_PARAM_ZVAL_DEREF(var)
+ Z_PARAM_ZVAL(var)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(syntax_only)
- Z_PARAM_ZVAL_DEREF_EX(callable_name, 0, 1)
+ Z_PARAM_ZVAL_DEREF(callable_name)
ZEND_PARSE_PARAMETERS_END();
if (syntax_only) {
@@ -370,7 +370,7 @@ PHP_FUNCTION(is_callable)
}
if (ZEND_NUM_ARGS() > 2) {
retval = zend_is_callable_ex(var, NULL, check_flags, &name, NULL, &error);
- zval_dtor(callable_name);
+ zval_ptr_dtor(callable_name);
ZVAL_STR(callable_name, name);
} else {
retval = zend_is_callable_ex(var, NULL, check_flags, NULL, NULL, &error);
@@ -391,7 +391,7 @@ PHP_FUNCTION(is_iterable)
zval *var;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(var)
+ Z_PARAM_ZVAL(var)
ZEND_PARSE_PARAMETERS_END();
RETURN_BOOL(zend_is_iterable(var));
diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c
index b0205094d9..4d9f4f5fbb 100644
--- a/ext/standard/user_filters.c
+++ b/ext/standard/user_filters.c
@@ -502,7 +502,7 @@ PHP_FUNCTION(stream_bucket_new)
php_stream_bucket *bucket;
ZEND_PARSE_PARAMETERS_START(2, 2)
- Z_PARAM_ZVAL_DEREF(zstream)
+ Z_PARAM_ZVAL(zstream)
Z_PARAM_STRING(buffer, buffer_len)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
diff --git a/ext/standard/var.c b/ext/standard/var.c
index d6d17c2ec6..0ae7991412 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -573,7 +573,7 @@ PHP_FUNCTION(var_export)
smart_str buf = {0};
ZEND_PARSE_PARAMETERS_START(1, 2)
- Z_PARAM_ZVAL_DEREF(var)
+ Z_PARAM_ZVAL(var)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(return_output)
ZEND_PARSE_PARAMETERS_END();
@@ -1024,7 +1024,7 @@ PHP_FUNCTION(serialize)
smart_str buf = {0};
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(struc)
+ Z_PARAM_ZVAL(struc)
ZEND_PARSE_PARAMETERS_END();
PHP_VAR_SERIALIZE_INIT(var_hash);