php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77679 Operator Precedence table does not contain yield and yield from
Submitted: 2019-02-28 10:26 UTC Modified: 2019-02-28 15:09 UTC
From: enumag at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: enumag at gmail dot com
New email:
PHP Version: OS:

 

 [2019-02-28 10:26 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-28 15:08 UTC] 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 15:09 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2019-02-28 15:09 UTC] cmb@php.net
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.
 [2019-03-21 19:30 UTC] salathe@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=837f7208f4c40b9ab0b58e2c72b355591bf51e62
Log: Fix #77679: Operator Precedence table does not contain yield and yield from
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=9a9be2c2b01bbf349c14818cf792b0c63d31aa20
Log: Fix #77679: Operator Precedence table does not contain yield and yield from
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 17:01:31 2024 UTC