downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

ArrayIterator::count> <ArrayIterator::asort
[edit] Last updated: Fri, 17 May 2013

view this page in

ArrayIterator::__construct

(PHP 5 >= 5.0.0)

ArrayIterator::__constructConstruit un ArrayIterator

Description

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

Construit un objet ArrayIterator.

Avertissement

Cette fonction n'est pas documentée et seule la liste des arguments est disponible.

Liste de paramètres

array

Le tableau ou l'objet à itérer.

flags

Drapeaux permettant de contrôler le comportement de l'objet ArrayIterator. Voir la documentation de la méthode ArrayIterator::setFlags().

Valeurs de retour

Un objet ArrayIterator.

Erreurs / Exceptions

ArrayIterator::__construct() émet une exception InvalidArgumentException si une variable autre qu'un tableau ou un objet est fourni.

Voir aussi



add a note add a note User Contributed Notes ArrayIterator::__construct - [1 notes]
up
0
foobuilder at gmail dot com
2 years ago
The method description looks like it requires a parameter, but it is actually optional:

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

 
show source | credits | stats | sitemap | contact | advertising | mirror sites