SHARE
TWEET

Untitled

a guest May 25th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. class Palindrome
  3. {
  4.    
  5.     public static function isPalindrome($word)
  6.     {
  7.         if (strtolower(strrev($word)) == strtolower($word)){
  8.             echo $word." is a palindrome.\n\n";
  9.             return true;  
  10.         }
  11.             else{
  12.             echo $word." is not a palindrome.\n\n";
  13.             return false;
  14.         }
  15.     }
  16. }
  17. echo Palindrome::isPalindrome('Deleveled');
  18. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top