A função Ds \ Deque :: push () pode adicionar valores ao final do deque.
Sintaxe
public void Ds\Deque::push([ mixed $...values ] )
A função Ds \ Deque :: push () não retorna nenhum valor.
Exemplo 1
<?php
$deque = new \Ds\Deque([10, 20, 30, 40, 50]);
echo("The elements in deque: \n");
print_r($deque);
echo("\n Add number 100 in deque: \n");
$deque->push(100);
echo("\n The elements in deque: \n");
print_r($deque);
?>
Exemplo 2
<?php
$deque = new \Ds\Deque([10, 20, 30, 40, 50]);
echo("The elements in deque: \n");
print_r($deque);
echo("\n Adding elements in deque: \n");
$deque->push(...[60, 70, 80, 90]);
echo("\n The elements in deque: \n");
print_r($deque);
?>