Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Iterator::rewindIteratorAggregate>
^IteratorLast updated: Mon, 26 Oct 2026

Iterator::valid

(PHP 5, PHP 7, PHP 8)

Iterator::valid — Checks if current position is valid

Description

public function Iterator::valid(): bool

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

Parameters

This function has no parameters.

Return Values

The return value will be casted to bool and then evaluated. Returns true on success or false on failure.


<Iterator::rewindIteratorAggregate>
^IteratorLast updated: Mon, 26 Oct 2026