SplFixedArray::__construct
(PHP 5 >= 5.3.0)
SplFixedArray::__construct — Construit un nouveau SplFixedArray
Description
public SplFixedArray::__construct
( int $size
)
Construit un nouvel objet SplFixedArray, vide.
Liste de paramètres
- size
-
La taille du tableau à taille fixe, par défaut 0.
Valeurs de retour
Aucune valeur n'est retournée.
Exemples
Exemple #1 Exemple avec SplFixedArray::__construct()
<?php
$array = new SplFixedArray(5);
$array[1] = 2;
$array[4] = "foo";
foreach($array as $v) {
var_dump($v);
}
?>
L'exemple ci-dessus va afficher :
NULL int(2) NULL NULL string(3) "foo"
SplFixedArray::__construct
There are no user contributed notes for this page.
