Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Palindrome
- {
- public static function isPalindrome($word)
- {
- $wordCase = self::ignoreCase($word);
- if($wordCase == strrev($wordCase))
- {
- return true;
- }
- return false;
- }
- private function ignoreCase($word)
- {
- return strtolower($word);
- }
- }
- echo Palindrome::isPalindrome('deleveled');
Add Comment
Please, Sign In to add comment