编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
  • « Ds\Vector::remove
  • Ds\Vector::reversed »
  • PHP Manual
  • Vector
  • Reverses the vector in-place

Ds\Vector::reverse

(PECL ds >= 1.0.0)

Ds\Vector::reverse — Reverses the vector in-place

说明

public Ds\Vector::reverse ( void ) : void

Reverses the vector in-place.

参数

此函数没有参数。

返回值

没有返回值。

范例

Example #1 Ds\Vector::reverse() example

<?php
$vector 
= new \Ds\Vector(["a", "b", "c"]);
$vector->reverse();

print_r($vector);
?>

以上例程的输出类似于:

Ds\Vector Object
(
    [0] => c
    [1] => b
    [2] => a
)
相关文章
php deque reverses the deque in placephp map reverses the map in placephp sequence reverses the sequence in placephp set reverses the set in placephp set sorts the set in placephp vector inserts values at a given indexphp vector returns whether the vector is emptyphp vector joins all values together as a stringphp vector reverses the vector in placephp vector returns a sub vector of a given rangephp vector sorts the vector in placephp vector returns a sorted copyphp trader 函数 vector trigonometric asinphp trader 函数 vector arithmetic expphp trader 函数 vector log naturalphp trader 函数 vector log10php trader 函数 vector trigonometric tanhphp pht vector inserts a value into the vectorphp pht vector acquires the vector s mutex lockphp splpriorityqueue compare priorities in order to place elements correctly in the heap while sifting up
关注编程学问公众号
编程学问网 湘ICP备20001732号