PHPWales 2020 - June 3rd to June 4th

OuterIterator::getInnerIterator

(PHP 5 >= 5.1.0, PHP 7)

OuterIterator::getInnerIterator現在のエントリの内部イテレータを返す

説明

public OuterIterator::getInnerIterator ( void ) : Iterator

現在のイテレータエントリの内部イテレータを返します。

パラメータ

この関数にはパラメータはありません。

返り値

現在のエントリの内部イテレータを返します。

add a note add a note

User Contributed Notes 1 note

up
0
Sjakie Pruts
4 months ago
The return type is merely documented here, it's not actually enforced. For instance, the IteratorIterator implementation can return Traversable, which would break the interface. Most likely, this is for backwards compatibility with code written before return type hints existed. It's still possible to create your own namespaced OuterIterator interface that extends the global one and add a typehint for this method in there.
To Top