Ds\Vector::last
(PECL ds >= 1.0.0)
Ds \ Vector :: last - 返回最后一个值。
描述
public mixed Ds\Vector::last ( void )
返回向量中的最后一个值。
参数
该功能没有参数。
返回值
矢量中的最后一个值。
错误/异常
如果为空则为 UnderflowException。
例子
示例#1 Ds \ Vector :: last()示例
<?php
$vector = new \Ds\Vector([1, 2, 3]);
var_dump($vector->last());
?>
上面的例子会输出类似于:
int(3)
← Ds\Vector::jsonSerialize
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com