HH\Iterator::valid

( excerpt from http://php

public function valid(): bool;

net/manual/en/iterator.valid.php )

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

Return Values

  • mixed - The return value will be casted to boolean and then evaluated. Returns TRUE on success or FALSE on failure.