Skip to content

Instantly share code, notes, and snippets.

@farindra
Created May 12, 2019 06:50
Show Gist options
  • Save farindra/53877f0e7e369eb800cdb3d37a65d369 to your computer and use it in GitHub Desktop.
Save farindra/53877f0e7e369eb800cdb3d37a65d369 to your computer and use it in GitHub Desktop.
BE_PHP #1
<?php
class Palindrome
{
public static function isPalindrome($word)
{
$word = strtolower(trim($word));
if (strrev($word) == $word)
return TRUE;
else
return FALSE;
}
}
echo Palindrome::isPalindrome('Deleveled');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment