Available on php
Classes implementing RecursiveIterator can be used to iterate over iterators recursively.
RecursiveIterator
See also:
https://www.php.net/manual/en/class.recursiveiterator.php
getChildren():Null<RecursiveIterator<K, V>>
hasChildren():Bool