SplFixedArray::getSize
PHP function
Edit on GitHub ✎
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
Gets the size of the array
Description
SplFixedArray::getSize(): int
Gets the size of the array.
Parameters Parameters
Return Values
Returns the size of the array, as an int.
Examples
SplFixedArray::getSize example
php
<?php
$array = new SplFixedArray(5);
echo $array->getSize()."\n";
$array->setSize(10);
echo $array->getSize()."\n";
?>The above example will output:
output
5
10Notes
Note
This method is functionally equivalent to SplFixedArray::count
See Also
SplFixedArray::count