编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
  • « 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 sequence sorts the sequence in placephp set reverses the set in placephp vector removes all valuesphp vector creates a new instancephp vector determines if the vector contains given valuesphp vector removes and returns the last valuephp vector adds values to the end of the vectorphp vector reduces the vector to a single value using a callback functionphp vector reverses the vector in placephp vector sorts the vector in placephp pdf 函数 place single line of textphp statistic 函数 returns the power sum of a vectorphp trader 函数 vector ceilphp trader 函数 vector square rootphp imagickdraw sets the vector graphicsphp pht vector releases the vector s mutex lockphp pht vector unshifts a value to the vector front
关注编程学问公众号
编程学问网 湘ICP备20001732号