PHP - Manual: Ds\Vector::first
2024-12-22
(PECL ds >= 1.0.0)
Ds\Vector::first — Returns the first value in the vector
此函数没有参数。
The first value in the vector.
UnderflowException if empty.
示例 #1 Ds\Vector::first() example
<?php
$vector = new \Ds\Vector([1, 2, 3]);
var_dump($vector->first());
?>
以上例程的输出类似于:
int(1)