PHP Conference Kansai 2025

Generator::current

(PHP 5 >= 5.5.0, PHP 7, PHP 8)

Generator::current返回当前产生的值

说明

public Generator::current(): mixed

参数

此函数没有参数。

返回值

返回当前产生的值。

添加备注

用户贡献的备注 1 note

up
4
gib-o-master
3 years ago
current() advances untouched generator, same as next(), it makes the first step/iteration. the following calls will not.

non-yielded value will be NULL
To Top