Guest User

Untitled

a guest
Jan 23rd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. <?php
  2. class Palindrome
  3. {
  4. public static function isPalindrome($word)
  5. {
  6. $lowerCase = strtolower($word);
  7. $backwardCase = strrev($lowerCase);
  8. if($backwardCase == $lowerCase){
  9. return TRUE;
  10. }
  11.  
  12. return FALSE;
  13.  
  14.  
  15. }
  16. }
  17.  
  18. echo Palindrome::isPalindrome('Deleveled');
Add Comment
Please, Sign In to add comment