The Ds\Sequence::reversed() function is an inbuilt function in PHP which is used to return the reverse copy of sequence element.
Ds\Sequence abstract public Ds\Sequence::reversed ( void )
Parameters: This function does not accepts any parameter.
Return Value: This function returns the reversed copy of sequence elements.
Below programs illustrate the Ds\Sequence::reversed() function in PHP:
Ds\Vector Object (  => 1  => 2  => 3  => 4  => 5 ) After reversing the sequence elements Ds\Vector Object (  => 5  => 4  => 3  => 2  => 1 )
Ds\Vector Object (  => Geeks  => for  => Geeks  => Computer  => Science  => Portal ) Sequence after reversing Ds\Vector Object (  => Portal  => Science  => Computer  => Geeks  => for  => Geeks )
- PHP | Ds\Map reversed() Function
- PHP Ds\Set reversed() Function
- PHP | Ds\Vector reversed() Function
- PHP | Ds\Deque reversed() Function
- HTML | <ol> reversed Attribute
- HTML | DOM Ol reversed Property
- HTML | reversed Attribute
- How to get the function name inside a function in PHP ?
- CSS | url() Function
- D3.js | d3.set.has() Function
- PHP | Ds\Map last() Function
- 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.