DynamicArray::getSize

(Available since version 1.0)

DynamicArray::getSizeGets the size of the array

Description

public int DynamicArray::getSize ( void )

Gets the size of the array.

Note:

This method is functionally equivalent to DynamicArray::count().

Parameters

This function has no parameters.

Return Values

Returns the size of the array, as an integer.

Examples

Example #1 DynamicArray::getSize() example

<?php
require 'vendor/autoload.php'// A PSR-4 or PSR-0 autoloader
use \SEIDS\Arrays\Dynamic\DynamicArray;

$array = new DynamicArray(5);
echo 
$array->getSize()."\n";
$array->setSize(10);
echo 
$array->getSize()."\n";
?>

The above example will output:

5
10

See Also

To Top