Javatpoint Logo
Javatpoint Logo

PHP strrev() Function

The strrev() function is predefined function of PHP. It is used to reverse a string. It is one of the most basic string operations which are used by programmers and developers.


Parameter Description Required/Optional
String Specify the string to reverse Required

Example 1


Your Number is:Hello PHP
By using 'strrev()' function:PHP olleH

Example 2


Your string is:Hello PHP
After using 'strrev()' function:PHP olleH
Again after using 'strrev()'function:Hello PHP

See Also:

  • trim() : It is used to remove whitespace.
  • ltrim() : It is used to remove whitespace from the left side of a string.
  • rtrim(): It is used to remove whitespace from the right side of a string.
  • md5() : It is used to calculate the MD5 hash of a string.


Next TopicPHP String

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA