Checks whether the current element is valid

- « EmptyIterator::rewind

- FilesystemIterator »

- PHP Manual
- EmptyIterator
- Checks whether the current element is valid

# EmptyIterator::valid

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

EmptyIterator::valid — Checks whether the current element is valid

### Description

public EmptyIterator::valid(): false

Checks whether the current element is valid.

> Note:

> The EmptyIterator is always empty and will never have a valid value. The return value is always `false`.

### Parameters

This function has no parameters.

### Return Values

`false`