SplFixedArray::__construct
SplFixedArray::current
SplFixedArray
PHP Manual

# SplFixedArray::count

(PHP 5 >= 5.3.0)

SplFixedArray::count — Returns the size of the array

### Descrição

public int SplFixedArray::count ( void )

Returns the size of the array.

### Parâmetros

Esta função não possui parâmetros.

### Valor Retornado

Returns the size of the array.

### Exemplos

Exemplo #1 SplFixedArray::count() example

`<?php
$array = new SplFixedArray(5);
echo $array->count() . "\n";
echo count($array) . "\n";
?>`

O exemplo acima irá imprimir:

    5
    5

### Notas

> Nota:

> This method is functionally equivalent to SplFixedArray::getSize().

> Nota:

> The count of elements is always equal to the set size because all values are initially initialized with `NULL`.

### Veja Também

- SplFixedArray::getSize() - Gets the size of the array

SplFixedArray::__construct
SplFixedArray::current
SplFixedArray
PHP Manual