summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2017-06-26 17:22:01 +0200
committerRemi Collet <remi@php.net>2017-06-26 17:22:01 +0200
commit85c32322acfc07628140bf631e7c52b12e6050b4 (patch)
treeae79035283e68957177407123d7d342278e021d9 /Zend/zend_compile.c
parent4ed8ff509001b35e0cb971a1d6a294345c5d7673 (diff)
parentcaaeb4849aa56cbbdc66ea015c11a58bd47a43ff (diff)
downloadphp-git-85c32322acfc07628140bf631e7c52b12e6050b4.tar.gz
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (24 commits) Removed EG(valid_symbol_table). Used EG(active) instead. Release temporary string reference Remove superfluous semicolons Fix tests on Windows Produce a better exception message when IntlDateFormatter constructor fails. Fix format arguments Remove unused variable op2. It is redeclared later. Fix typo Implement object type annotation Fixed bug #73173 Expose inflate_get_status() and inflate_get_read_len() functions Add more constants, improve comments, and add tests Fixed bug #73900 Add OPENSSL_DONT_ZERO_PAD_KEY constant to prevent key padding Drop soap_hash_str_find_deref() Only compute callback name in error cases Extract zend_get_callable_name() API Move va_copy compatibility code into zend_portability.h Remove unnecessary string copy Fix FE_FETCH_* exception check ...
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 309f7005d2..f854631f0b 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -162,6 +162,7 @@ static const struct reserved_class_name reserved_class_names[] = {
{ZEND_STRL("true")},
{ZEND_STRL("void")},
{ZEND_STRL("iterable")},
+ {ZEND_STRL("object")},
{NULL, 0}
};
@@ -207,6 +208,7 @@ static const builtin_type_info builtin_types[] = {
{ZEND_STRL("bool"), _IS_BOOL},
{ZEND_STRL("void"), IS_VOID},
{ZEND_STRL("iterable"), IS_ITERABLE},
+ {ZEND_STRL("object"), IS_OBJECT},
{NULL, 0, IS_UNDEF}
};
@@ -5565,6 +5567,11 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
"with iterable type can only be an array or NULL");
}
break;
+
+ case IS_OBJECT:
+ zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
+ "with an object type can only be NULL");
+ break;
default:
if (!ZEND_SAME_FAKE_TYPE(ZEND_TYPE_CODE(arg_info->type), Z_TYPE(default_node.u.constant))) {