SplFixedArray::getSize

(PHP 5 >= 5.3.0, PHP 7)
Gets the size of the array
public int SplFixedArray::getSize ( void )

Gets the size of the array.

Returns:

Returns the size of the array, as an integer.

Notes:

This method is functionally equivalent to SplFixedArray::count()

Examples:
SplFixedArray::getSize() example
<?php
$array = new SplFixedArray(5);
echo $array->getSize()."\n";
$array->setSize(10);
echo $array->getSize()."\n";
?>

The above example will output:

5
10
See also:

SplFixedArray::count() -

doc_php
2016-02-24 16:19:30
Comments
Leave a Comment

Please login to continue.