Bug #77679 [Opn->Csd]: Operator Precedence table does not contain yield and yield from
| From: | cmb@php.net | Date: | Thu, 28 Feb 2019 15:09:17 +0000 |
| Subject: | Bug #77679 [Opn->Csd]: Operator Precedence table does not contain yield and yield from | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-16437@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77679&edit=1
ID: 77679
Updated by: cmb@php.net
Reported by: enumag at gmail dot com
Summary: Operator Precedence table does not contain yield and
yield from
-Status: Open
+Status: Closed
Type: Bug
Package: Documentation problem
Operating System: irrelevant
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2019-02-28 15:08:44] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=346925
Log: Fix #77679: Operator Precedence table does not contain yield and yield from
------------------------------------------------------------------------
[2019-02-28 10:26:41] enumag at gmail dot com
Description:
------------
The operator precedence table (http://php.net/manual/en/language.operators.precedence.php) does not
contain the
yield and yield from operators. Since they can return a value
and can be a part of an expression it is important to know their precedence.
For example:
```
$state = yield from self::removeContacts($state, $command->contacts) ?? $state;
```
This code is apparently equivalent to
```
$state = yield from (self::removeContacts($state, $command->contacts) ?? $state);
```
which I would not have guessed.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77679&edit=1