(PHP 5 >= 5.3.0, PHP 7)
SplFixedArray::toArray — Retourne un tableau PHP à partir d'un tableau à taille fixe
Retourne un tableau PHP à partir d'un tableau à taille fixe.
Cette fonction ne contient aucun paramètre.
Retourne un tableau PHP à partir d'un tableau à taille fixe.
Exemple #1 Exemple avec SplFixedArray::toArray()
<?php
$fa = new SplFixedArray(3);
$fa[0] = 0;
$fa[2] = 2;
var_dump($fa->toArray());
?>
L'exemple ci-dessus va afficher :
array(3) {
[0]=>
int(0)
[1]=>
NULL
[2]=>
int(2)
}