A função Ds \ Queue :: capacity () pode retornar a capacidade atual.
Sintaxe
public int Ds\Queue::capacity( void )
A função Ds \ Queue :: capacity () não tem parâmetros.
Exemplo 1
<?php
$queue = new \Ds\Queue();
var_dump($queue->capacity());
?>
Exemplo-2
<?php
$queue = new \Ds\Queue();
echo("The current capacity is:");
var_dump($queue->capacity());
echo("The current capacity is:");
$queue->allocate(20);
var_dump($queue->capacity());
$queue->allocate(100);
var_dump($queue->capacity());
?>