@@ -1792,8 +1792,9 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
1792
1792
smart_str_appendc (str , ']' );
1793
1793
break ;
1794
1794
case ZEND_AST_PROP :
1795
+ case ZEND_AST_NULLSAFE_PROP :
1795
1796
zend_ast_export_ex (str , ast -> child [0 ], 0 , indent );
1796
- smart_str_appends (str , "->" );
1797
+ smart_str_appends (str , ast -> kind == ZEND_AST_NULLSAFE_PROP ? "?->" : "->" );
1797
1798
zend_ast_export_var (str , ast -> child [1 ], 0 , indent );
1798
1799
break ;
1799
1800
case ZEND_AST_STATIC_PROP :
@@ -2066,8 +2067,9 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
2066
2067
2067
2068
/* 3 child nodes */
2068
2069
case ZEND_AST_METHOD_CALL :
2070
+ case ZEND_AST_NULLSAFE_METHOD_CALL :
2069
2071
zend_ast_export_ex (str , ast -> child [0 ], 0 , indent );
2070
- smart_str_appends (str , "->" );
2072
+ smart_str_appends (str , ast -> kind == ZEND_AST_NULLSAFE_METHOD_CALL ? "?->" : "->" );
2071
2073
zend_ast_export_var (str , ast -> child [1 ], 0 , indent );
2072
2074
smart_str_appendc (str , '(' );
2073
2075
zend_ast_export_ex (str , ast -> child [2 ], 0 , indent );
0 commit comments