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