(PHP 5 >= 5.3.0)
SplFixedArray::__construct — Construit un nouveau SplFixedArray
Construit un nouvel objet SplFixedArray, vide.
La taille du tableau à taille fixe.
Aucune valeur n'est retournée.
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"