PHP | Ds\Vector first()函数
Ds\Vector::first()函数是PHP中的一个内置函数,用于查找向量中的第一个元素。
句法:
mixed public Ds\Vector::first( void )
参数:此函数不接受任何参数。
返回值:此函数返回向量中存在的第一个元素。
下面的程序说明了PHP中的Ds\Vector::first()函数:
方案一:
first());
?>
输出:
First element of the vector: int(1)
方案二:
first());
?>
输出:
First element of the vector: string(5) "geeks"
参考: http: PHP。 PHP