ArrayIterator::__construct

(PHP 5, PHP 7)

ArrayIterator::__constructConstruct an ArrayIterator

˵��

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

Constructs an ArrayIterator object.

Warning

��������δ��д�ĵ������в����б�

����

array

The array or object to be iterated on.

flags

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

����ֵ

An ArrayIterator object.

�����쳣

ArrayIterator::__construct() throws an InvalidArgumentException if anything besides an array or an object is given.

�μ�