Ds\Vector::reverse
PHP function
Edit on GitHub ✎
(PECL ds >= 1.0.0)
Reverses the vector in-place
Description
Ds\Vector::reverse(): void
Reverses the vector in-place.
Parameters Parameters
Return Values
Void
Examples
Ds\Vector::reverse() example
php
<?php
$vector = new \Ds\Vector(["a", "b", "c"]);
$vector->reverse();
print_r($vector);
?>The above example will output something similar to:
output
Ds\Vector Object
(
[0] => c
[1] => b
[2] => a
)