summaryrefslogtreecommitdiff
path: root/Zend/zend_language_parser.y
diff options
context:
space:
mode:
authorSammy Kaye Powers <sammyk@sammykmedia.com>2017-10-07 12:57:07 -0500
committerJoe Watkins <krakjoe@php.net>2017-11-06 07:13:56 +0000
commitb591c329ee3129adbdc35141bb1542d119f7a2a1 (patch)
treec2d34c0f89cc1ca7254feca1361cd037ad02f403 /Zend/zend_language_parser.y
parent4da0bfc7d717695cbd16de816c1fbfe75053f581 (diff)
downloadphp-git-b591c329ee3129adbdc35141bb1542d119f7a2a1.tar.gz
Allow trailing commas in function and method calls
Diffstat (limited to 'Zend/zend_language_parser.y')
-rw-r--r--Zend/zend_language_parser.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index 2c508a59fe..6d11afc8ba 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -439,7 +439,7 @@ statement:
| T_ECHO echo_expr_list ';' { $$ = $2; }
| T_INLINE_HTML { $$ = zend_ast_create(ZEND_AST_ECHO, $1); }
| expr ';' { $$ = $1; }
- | T_UNSET '(' unset_variables ')' ';' { $$ = $3; }
+ | T_UNSET '(' unset_variables possible_comma ')' ';' { $$ = $3; }
| T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement
{ $$ = zend_ast_create(ZEND_AST_FOREACH, $3, $5, NULL, $7); }
| T_FOREACH '(' expr T_AS foreach_variable T_DOUBLE_ARROW foreach_variable ')'
@@ -670,7 +670,7 @@ return_type:
argument_list:
'(' ')' { $$ = zend_ast_create_list(0, ZEND_AST_ARG_LIST); }
- | '(' non_empty_argument_list ')' { $$ = $2; }
+ | '(' non_empty_argument_list possible_comma ')' { $$ = $2; }
;
non_empty_argument_list:
@@ -1260,7 +1260,7 @@ encaps_var_offset:
internal_functions_in_yacc:
- T_ISSET '(' isset_variables ')' { $$ = $3; }
+ T_ISSET '(' isset_variables possible_comma ')' { $$ = $3; }
| T_EMPTY '(' expr ')' { $$ = zend_ast_create(ZEND_AST_EMPTY, $3); }
| T_INCLUDE expr
{ $$ = zend_ast_create_ex(ZEND_AST_INCLUDE_OR_EVAL, ZEND_INCLUDE, $2); }