com php-src: Add UPDRADING note about yield operator behavior: UPGRADING
| From: | Nikita Popov | Date: | Mon, 09 Mar 2015 11:41:33 +0000 |
| Subject: | com php-src: Add UPDRADING note about yield operator behavior: UPGRADING | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85404@lists.php.net to get a copy of this message | ||
Commit: 2f156c61f19a889c8ed39fe8eb3b3220555db647
Author: Nikita Popov <nikic@php.net> Mon, 9 Mar 2015 12:38:46 +0100
Parents: a4262827ea23cf92c743d42399fbaca090015247
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2f156c61f19a889c8ed39fe8eb3b3220555db647
Log:
Add UPDRADING note about yield operator behavior
Fixes bug #69160.
[ci skip]
Bugs:
https://bugs.php.net/69160
Changed paths:
M UPGRADING
Diff:
diff --git a/UPGRADING b/UPGRADING
index 1e81505..e844cc4 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 (<script language=php>) tags.
(RFC: https://wiki.php.net/rfc/remove_alternative_php_tags)
. Removed support for assigning the result of new by reference.