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