//** 验证是否是回文 */ function isPalindrome($str){ //strrev() 倒叙字符串函数 $new_str = strrev($str); if($new_str === $str){ return "是回文"; }else{ return "不是回文"; } } echo isPalindrome("1234321");
//** 验证是否是回文 */ function isPalindrome($str){ //strrev() 倒叙字符串函数 $new_str = strrev($str); if($new_str === $str){ return "是回文"; }else{ return "不是回文"; } } echo isPalindrome("1234321");