PHP strrev


strrev() function returns a reversed string.

<?PHP
$str="The best time is no time at that time";
echo strrev($str);  //emit taht ta emit on si emit tseb ehT
?>

strrev() can be used to check whether a string is symmetry or not.
<?PHP
$str="PHP";
if ($str == strrev($str)) echo "String is symmetrical";
else echo "String is asymmetrical";
//String is symmetrical
?>