The Ds\Vector::reverse() function is an inbuilt function in PHP which is used to reverse the vector elements in-place.
void public Ds\Vector::reverse( void )
Parameters: This function does not accepts any parameters.
Return Value: This function does not return any value.
Below programs illustrate the Ds\Vector::reverse() function in PHP:
Ds\Vector Object (  => 1  => 2  => 3  => 4  => 5 ) Vector after reversing Ds\Vector Object (  => 5  => 4  => 3  => 2  => 1 )
Ds\Vector Object (  => Geeks  => GFG  => Computer  => Science  => Portal ) Vector after reversing Ds\Vector Object (  => Portal  => Science  => Computer  => GFG  => Geeks )
- p5.js | reverse() function
- PHP | Ds\Map reverse() Function
- PHP Ds\Set reverse() Function
- PHP | Ds\Deque reverse() Function
- Lodash _.reverse() Function
- PHP | Ds\Sequence reverse() Function
- PHP | Reverse a String
- Node.js | Mapbox Reverse Geocoding API
- Node.js | dnsPromises.reverse() Method
- TypeScript | Array reverse() Method
- How to reverse an animation on mouse out after hover?
- How to get the function name inside a function in PHP ?
- p5.js | box() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.