PHP Velho Oeste 2024

ArrayIterator::__construct

(PHP 5, PHP 7, PHP 8)

ArrayIterator::__constructСоздаёт ArrayIterator

Описание

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

Создаёт ArrayIterator типа object.

Внимание

Функция пока не документирована; для знакомства доступен только список аргументов.

Список параметров

array

Массив или объект, который может быть итерирован.

flags

Флаги для управления поведением объекта ArrayIterator. Смотрите ArrayIterator::setFlags().

Смотрите также

add a note add a note

User Contributed Notes 1 note

up
0
foobuilder at gmail dot com
13 years ago
The method description looks like it requires a parameter, but it is actually optional:

$iter= new ArrayIterator();
$iter['bacon'] = 'tasty';
To Top