The Ds\Sequence::rotate() function is an inbuilt function in PHP which is used to rotate the sequence element by a given number of rotations.
void abstract public Ds\Sequence::rotate ( int $rotations )
Parameters: This function accepts single parameter $rotations which holds the number of rotations.
Return value: This function does not return any value.
Below programs illustrate the Ds\Sequence::rotate() function in PHP:
Original Sequence Ds\Vector Object (  => 1  => 2  => 3  => 4  => 5 ) Sequence after rotating by 3 places Ds\Vector Object (  => 4  => 5  => 1  => 2  => 3 )
Original Sequence Ds\Vector Object (  => Geeks  => for  => Geeks  => Computer  => Science  => Portal ) Sequence after rotating by 8 places Ds\Vector Object (  => Geeks  => Computer  => Science  => Portal  => Geeks  => for )
- CSS | rotate() Function
- p5.js | rotate() function
- CSS | hue-rotate() Function
- PHP | ImagickDraw rotate() Function
- PHP | Ds\Vector rotate() Function
- PHP | Ds\Deque rotate() Function
- Node.js | GM rotate() Function
- Node Jimp | rotate
- Rotate a polygon by given degrees in p5.js
- HTML canvas rotate() Method
- How to get the function name inside a function in PHP ?
- PHP | min( ) 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.