mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
e4bf37c420
commit
c4910a6ef8
1 changed files with 4 additions and 3 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue