(PECL ds >= 1.0.0)
Ds\Stack::push — Pushes values onto the stack
valuesThe values to push onto the stack.
Es wird kein Wert zurückgegeben.
Beispiel #1 Ds\Stack::push() example
<?php
$stack = new \Ds\Stack();
$stack->push("a");
$stack->push("b");
$stack->push("c", "d");
$stack->push(...["e", "f"]);
print_r($stack);
?>Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
Ds\Stack Object
(
[0] => a
[1] => b
[2] => c
[3] => d
[4] => e
[5] => f
)