编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
  • « 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 vector returns the first value in the vectorphp vector returns the value at a given indexphp vector inserts values at a given indexphp vector returns whether the vector is emptyphp vector reverses the vector in placephp vector updates a value at a given indexphp vector removes and returns the first valuephp vector returns a sub vector of a given rangephp vector sorts the vector in placephp trader 函数 vector log naturalphp trader 函数 vector trigonometric tanphp trader 函数 vector trigonometric tanhphp imagick applies a color vector to each pixel in the imagephp pht vector vector creationphp pht vector deletes a value in the vectorphp pht vector inserts a value into the vector
关注编程学问公众号
编程学问网 湘ICP备20001732号