From a50198d0fef652ca052cda642d6e98a9101eb73f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 15 Jan 2019 17:04:24 +0100 Subject: Implement ??= operator RFC: https://wiki.php.net/rfc/null_coalesce_equal_operator $a ??= $b is $a ?? ($a = $b), with the difference that $a is only evaluated once, to the degree that this is possible. In particular in $a[foo()] ?? $b function foo() is only ever called once. However, the variable access themselves will be reevaluated. --- Zend/zend_ast.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Zend/zend_ast.h') diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index 9600b801ca..5716296bbd 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -120,6 +120,7 @@ enum _zend_ast_kind { ZEND_AST_INSTANCEOF, ZEND_AST_YIELD, ZEND_AST_COALESCE, + ZEND_AST_ASSIGN_COALESCE, ZEND_AST_STATIC, ZEND_AST_WHILE, -- cgit v1.2.1