(PHP 4, PHP 5, PHP 7, PHP 8)
strrev — Reverse a string
$string
Returns string, reversed.
string
The string to be reversed.
Returns the reversed string.
Example #1 Reversing a string with strrev()
<?phpecho strrev("Hello world!"); // outputs "!dlrow olleH"?>