Dutch PHP Conference 2027

ArrayIterator::__construct

(PHP 5, PHP 7, PHP 8)

ArrayIterator::__constructConstruct an ArrayIterator

Descrizione

public function ArrayIterator::__construct(array|object $array = [], int $flags = 0)

Constructs an ArrayIterator object.

Avviso

Questa funzione, al momento non è documentata; è disponibile soltanto la lista degli argomenti.

Elenco dei parametri

array

The array or object to be iterated on. Passing an object is deprecated as of PHP 8.5.0.

flags

Flags to control the behaviour of the ArrayIterator object. See ArrayIterator::setFlags().

Errori/Eccezioni

As of PHP 8.5.0, throws an InvalidArgumentException if array is an enum.

Log delle modifiche

Versione Descrizione
8.5.0 Passing an enum as array now throws an InvalidArgumentException.
8.5.0 Passing an object as array is deprecated.

Vedere anche:

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top