SHARE
TWEET

Untitled

a guest May 24th, 2019 71 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.         $str = '';
  7.         $word = strtolower($word);
  8.        
  9.         $pjg = strlen($word);
  10.         for ($x = $pjg; $x >= 0; --$x) {
  11.             @$str .= $word[$x];
  12.         }
  13.         if ($word === $str) {
  14.             return true;
  15.         } else {
  16.             return false;
  17.         }
  18.         return ($word === $str);
  19.     }
  20. }
  21. 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