(PHP 5 >= 5.3.0, PHP 7)
Returns the size of the array
public int SplFixedArray::count ( void )
Returns the size of the array.
Returns:
Returns the size of the array.
Notes:
This method is functionally equivalent to SplFixedArray::getSize().
The count of elements is always equal to the set size because all values are initially initialized with NULL
.
Examples:
SplFixedArray::count() example
<?php $array = new SplFixedArray(5); echo $array->count() . "\n"; echo count($array) . "\n"; ?>
The above example will output:
5 5
See also:
Please login to continue.