SHARE
TWEET

Untitled

a guest May 22nd, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. class Palindrome
  3. {
  4.     public static function isPalindrome($word)
  5.     {
  6.         $reverse = strrev($word);
  7.         if(strcasecmp($reverse, $word) == 0){
  8.             return true;  
  9.         }else {
  10.             return false;
  11.         }
  12.     }
  13. }
  14.  
  15. echo Palindrome::isPalindrome('Deleveled');
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