PHP strrev() Function
ExampleGet your own PHP Server
Reverse the string "Hello World!":
<?php
echo strrev("Hello World!");
?>
Try it Yourself »
Definition and Usage
The strrev() function reverses a string.
Syntax
strrev(string)
Parameter Values
Parameter | Description |
---|---|
string | Required. Specifies the string to reverse |
Technical Details
Return Value: | Returns the reversed string |
---|---|
PHP Version: | 4+ |
❮ PHP String Reference