summaryrefslogtreecommitdiff
path: root/Zend/zend_ast.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-06-29 23:23:02 +0200
committerNikita Popov <nikita.ppv@gmail.com>2018-06-29 23:23:02 +0200
commitdeb1bad80f7587856ecbb6e7f482205572588bef (patch)
tree8f652cc6a9ae93263a3c325fa79bb411111825fb /Zend/zend_ast.c
parent15ad5d31d19b52761338df75a4f22191f9506798 (diff)
parent962706d16c29ec6dd5ec3a78edae9e8907bca20a (diff)
downloadphp-git-deb1bad80f7587856ecbb6e7f482205572588bef.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
Diffstat (limited to 'Zend/zend_ast.c')
-rw-r--r--Zend/zend_ast.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c
index c0fdf48cba..b7aa87e2c5 100644
--- a/Zend/zend_ast.c
+++ b/Zend/zend_ast.c
@@ -1076,6 +1076,9 @@ tail_call:
zend_ast_export_ex(str, decl->child[1], 0, indent);
if (decl->child[3]) {
smart_str_appends(str, ": ");
+ if (decl->child[3]->attr & ZEND_TYPE_NULLABLE) {
+ smart_str_appendc(str, '?');
+ }
zend_ast_export_ns_name(str, decl->child[3], 0, indent);
}
if (decl->child[2]) {
@@ -1610,6 +1613,9 @@ simple_list:
break;
case ZEND_AST_PARAM:
if (ast->child[0]) {
+ if (ast->child[0]->attr & ZEND_TYPE_NULLABLE) {
+ smart_str_appendc(str, '?');
+ }
zend_ast_export_ns_name(str, ast->child[0], 0, indent);
smart_str_appendc(str, ' ');
}