Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Palindrome
- {
- public static function isPalindrome($word)
- {
- $lowerCase = strtolower($word);
- $backwardCase = strrev($lowerCase);
- if($backwardCase == $lowerCase){
- return TRUE;
- }
- return FALSE;
- }
- }
- echo Palindrome::isPalindrome('Deleveled');
Add Comment
Please, Sign In to add comment