Skip to content

Instantly share code, notes, and snippets.

@AkiraYuuji
Created May 17, 2019 07:25
Show Gist options
  • Save AkiraYuuji/d9fa07d6b1fe6c83d380b785e6447378 to your computer and use it in GitHub Desktop.
Save AkiraYuuji/d9fa07d6b1fe6c83d380b785e6447378 to your computer and use it in GitHub Desktop.
<?php
class Palindrome
{
public static function isPalindrome($word)
{
$word = strtolower($word);
$b = strrev($word);
if($word == $b)
{
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