(PECL ds >= 1.0.0)
Ds\Stack::push — 将值压入堆栈
values要压入堆栈的值。
不返回任何值。
示例 #1 Ds\Stack::push() 示例
<?php
$stack = new \Ds\Stack();
$stack->push("a");
$stack->push("b");
$stack->push("c", "d");
$stack->push(...["e", "f"]);
print_r($stack);
?>以上示例的输出类似于
Ds\Stack Object
(
[0] => a
[1] => b
[2] => c
[3] => d
[4] => e
[5] => f
)