HH\Iterator::valid

Checks to see if the current iterator position is valid.

Description

public function valid(): bool

Checks to see if the current iterator position is valid.

This method is called after rewind() and next() to check if the current iterator position is valid.

Return Values

  • bool - true if the position is valid; false otherwise.