There was a note that has not been updated according implementation of https://wiki.php.net/rfc/generator-return-expressions in PHP 7.0.

-- 
Provided by anonymous 83640 (jdomenechbborges@gmail.com)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342557 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jean-Sebastien Hedde 2017-06-07 12:10:06 +00:00
parent e4bf37c420
commit c4910a6ef8

View file

@ -132,9 +132,10 @@ Single digit odd numbers from xrange(): 1 3 5 7 9
<note>
<para>
A generator cannot return a value: doing so will result in a compile
error. An empty <command>return</command> statement is valid syntax within
a generator and it will terminate the generator.
In PHP 5, a generator could not return a value: doing so would result in a compile
error. An empty <command>return</command> statement was valid syntax within
a generator and it would terminate the generator. Since PHP 7.0, a generator can
return values, which can be retieved using <methodname>Generator::getReturn</methodname>.
</para>
</note>