Fix #76104: Generator::next() causes yield to return null

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344528 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2018-03-16 17:33:42 +00:00
parent 1c7bd933fe
commit 9fadd7d16a
2 changed files with 7 additions and 2 deletions

View file

@ -218,8 +218,9 @@ foreach ($generator as $value) {
</para>
<para>
This syntax may be used in conjunction with the
<methodname>Generator::send</methodname> method.
The value that will be assigned to <varname>$data</varname> is the value
passed to <methodname>Generator::send</methodname>, or &null; if
<methodname>Generator::next</methodname> is called instead.
</para>
</caution>

View file

@ -13,6 +13,10 @@
<modifier>public</modifier> <type>void</type><methodname>Generator::next</methodname>
<void />
</methodsynopsis>
<para>
Calling <methodname>Generator::next</methodname> is equivalent to calling
<methodname>Generator::send</methodname> with &null; as argument.
</para>
</refsect1>
<refsect1 role="parameters">