diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-07 12:28:51 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-11 15:49:06 +0100 |
commit | e219ec144ef6682b71e135fd18654ee1bb4676b4 (patch) | |
tree | e4a3ae2b619cdc9fe50ee8e1fa5adb99d804dddf /ext/standard/basic_functions.c | |
parent | fe8fdfa3bd588d80ce60f6b3848058239e0a760f (diff) | |
download | php-git-e219ec144ef6682b71e135fd18654ee1bb4676b4.tar.gz |
Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2
This is a squash of PR #3734, which is a squash of PR #3313.
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r-- | ext/standard/basic_functions.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 9026cacc79..38949a6080 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4376,13 +4376,12 @@ PHP_FUNCTION(getopt) Z_PARAM_STRING(options, options_len) Z_PARAM_OPTIONAL Z_PARAM_ARRAY(p_longopts) - Z_PARAM_ZVAL_DEREF(zoptind) + Z_PARAM_ZVAL(zoptind) ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE); /* Init zoptind to 1 */ if (zoptind) { - zval_ptr_dtor(zoptind); - ZVAL_LONG(zoptind, 1); + ZEND_TRY_ASSIGN_LONG(zoptind, 1); } /* Get argv from the global symbol table. We calculate argc ourselves @@ -4530,7 +4529,7 @@ PHP_FUNCTION(getopt) /* Set zoptind to php_optind */ if (zoptind) { - ZVAL_LONG(zoptind, php_optind); + ZEND_TRY_ASSIGN_LONG(zoptind, php_optind); } free_longopts(orig_opts); |