From 49d98c5a3fe0ec3aaea5786d68af9dd14d18bd8c Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Wed, 30 Jun 1999 17:17:39 +0000 Subject: [PATCH] Make require accept any parameter --- Zend/zend-parser.y | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Zend/zend-parser.y b/Zend/zend-parser.y index f7e16c2e39..33aefc2bd6 100644 --- a/Zend/zend-parser.y +++ b/Zend/zend-parser.y @@ -176,8 +176,7 @@ statement: | T_ECHO echo_expr_list ';' | T_INLINE_HTML { do_echo(&$1 CLS_CC); } | expr ';' { do_free(&$1 CLS_CC); } - | T_REQUIRE scalar ';' { if ($2.op_type==IS_CONST && $2.u.constant.type==IS_STRING) { require_filename($2.u.constant.value.str.val CLS_CC); zval_dtor(&$2.u.constant); } else { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); } } - | T_REQUIRE '(' expr ')' ';' { if ($3.op_type==IS_CONST && $3.u.constant.type==IS_STRING) { require_filename($3.u.constant.value.str.val CLS_CC); zval_dtor(&$3.u.constant); } else { do_include_or_eval(ZEND_INCLUDE, &$$, &$3 CLS_CC); } } + | T_REQUIRE expr ';' { if ($2.op_type==IS_CONST && $2.u.constant.type==IS_STRING) { require_filename($2.u.constant.value.str.val CLS_CC); zval_dtor(&$2.u.constant); } else { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); } } | T_UNSET '(' r_cvar ')' ';' { do_unset(&$3 CLS_CC); } | T_FOREACH '(' expr T_AS { do_foreach_begin(&$1, &$3, &$2, &$4 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); } | ';' /* empty statement */ -- 2.40.0