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

search for in the

SplFixedArray::count> <SplFixedArray
Last updated: Fri, 14 Aug 2009

view this page in

SplFixedArray::__construct

(PHP 5 >= 5.3.0)

SplFixedArray::__constructConstruit 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"



add a note add a note User Contributed Notes
SplFixedArray::__construct
There are no user contributed notes for this page.

SplFixedArray::count> <SplFixedArray
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites