diff options
| -rw-r--r-- | UPGRADING | 3 | ||||
| -rw-r--r-- | Zend/zend_ast.c | 5 | ||||
| -rw-r--r-- | Zend/zend_language_parser.y | 3 |
3 files changed, 8 insertions, 3 deletions
@@ -70,6 +70,9 @@ PHP 8.0 UPGRADE NOTES will now always generate a fatal error. Previously a warning was generated in some cases. RFC: https://wiki.php.net/rfc/lsp_errors + . The precendence of the concatenation operator has changed relative to + bitshifts and addition as well as subtraction. + RFC: https://wiki.php.net/rfc/concatenation_precedence - COM: . Removed the ability to import case-insensitive constants from type diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index ea55f394c3..ee9c9dd326 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -910,8 +910,9 @@ ZEND_API void zend_ast_apply(zend_ast *ast, zend_ast_apply_func fn) { * 160 left & * 170 non-associative == != === !== * 180 non-associative < <= > >= <=> + * 185 left . * 190 left << >> - * 200 left + - . + * 200 left + - * 210 left * / % * 220 right ! * 230 non-associative instanceof @@ -1733,7 +1734,7 @@ simple_list: case ZEND_MOD: BINARY_OP(" % ", 210, 210, 211); case ZEND_SL: BINARY_OP(" << ", 190, 190, 191); case ZEND_SR: BINARY_OP(" >> ", 190, 190, 191); - case ZEND_CONCAT: BINARY_OP(" . ", 200, 200, 201); + case ZEND_CONCAT: BINARY_OP(" . ", 185, 185, 186); case ZEND_BW_OR: BINARY_OP(" | ", 140, 140, 141); case ZEND_BW_AND: BINARY_OP(" & ", 160, 160, 161); case ZEND_BW_XOR: BINARY_OP(" ^ ", 150, 150, 151); diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 22394868ba..f55672b55c 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -70,8 +70,9 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); %left '&' %nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP %nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL +%left '.' %left T_SL T_SR -%left '+' '-' '.' +%left '+' '-' %left '*' '/' '%' %precedence '!' %precedence T_INSTANCEOF |
