php8.5
Home/ Manual/ reference / spl/ The RecursiveIteratorIterator class

The RecursiveIteratorIterator class

Can be used to iterate through recursive iterators.

Intro

Can be used to iterate through recursive iterators.

Calls to methods that RecursiveIteratorIterator does not have are forwarded to the iterator at the current depth, as returned by RecursiveIteratorIterator::getSubIterator. This does not use __call().

Class synopsis

class RecursiveIteratorIterator implements OuterIterator { }

Predefined Constants

RecursiveIteratorIterator::LEAVES_ONLY
RecursiveIteratorIterator::SELF_FIRST
RecursiveIteratorIterator::CHILD_FIRST
RecursiveIteratorIterator::CATCH_GET_CHILD

Changelog

VersionDescription

Recursiveiteratoriterator

In this section

Source: reference/spl/recursiveiteratoriterator.xml · from the official PHP manual (php/doc-en)