Ds\Set::capacity
PHP function
Edit on GitHub ✎
(PECL ds >= 1.0.0)
Returns the current capacity
Description
Ds\Set::capacity(): int
Returns the current capacity.
Parameters Parameters
Return Values
The current capacity.
Examples
Ds\Set::capacity() example
php
<?php
$set = new \Ds\Set();
var_dump($set->capacity());
$set->add(...range(1, 50));
var_dump($set->capacity());
?>The above example will output something similar to:
output
int(16)
int(64)