From: Nikita Popov Date: Mon, 9 Mar 2015 11:38:46 +0000 (+0100) Subject: Add UPDRADING note about yield operator behavior X-Git-Tag: PRE_PHP7_NSAPI_REMOVAL~735 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f156c61f19a889c8ed39fe8eb3b3220555db647;p=php Add UPDRADING note about yield operator behavior Fixes bug #69160. [ci skip] --- diff --git a/UPGRADING b/UPGRADING index 1e81505f86..e844cc4dcd 100644 --- a/UPGRADING +++ b/UPGRADING @@ -323,6 +323,25 @@ Relevant RFCs: Other language changes ---------------------- +* The yield language construct no longer requires parentheses when used in an + expression context. It is now a right-associative operator with precedence + between the "print" and "=>" operators. This can result in different behavior + in some cases, for example: + + echo yield -1; + // Was previously interpreted as + echo (yield) - 1; + // And is now interpreted as + echo yield (-1); + + yield $foo or die; + // Was previously interpreted as + yield ($foo or die); + // And is now interpreted as + (yield $foo) or die; + + Such cases can always be resolved by adding additional parentheses. + . Removed ASP (<%) and script (