daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 43 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.         $word = strtolower($word);
  7.         $b = strrev($word);
  8.        
  9.         if($word == $b)
  10.         {
  11.             return true;
  12.         }else
  13.         {
  14.             return false;
  15.         }
  16.     }
  17. }
  18.  
  19. 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
 
Top