RecursiveCachingIterator::hasChildren

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

RecursiveCachingIterator::hasChildren — Check whether the current element of the inner iterator has children

Description

public function RecursiveCachingIterator::hasChildren(): bool

Checks whether the current element has children. The inner iterator is asked when the iterator moves to the element, so this method returns the result that was stored at that time.

Parameters

This function has no parameters.

Return Values

Returns true if the current element has children, false otherwise.

See Also