Skip to content

Instantly share code, notes, and snippets.

@andreaschrist27
Created January 18, 2019 06:51
Show Gist options
  • Save andreaschrist27/5b950cc11f9f179e4fa670dafd4c8443 to your computer and use it in GitHub Desktop.
Save andreaschrist27/5b950cc11f9f179e4fa670dafd4c8443 to your computer and use it in GitHub Desktop.
Palindrome PHP#1
<?php
class Palindrome
{
public static function isPalindrome($word)
{
$wordCase = self::ignoreCase($word);
if($wordCase == strrev($wordCase))
{
return true;
}
return false;
}
private function ignoreCase($word)
{
return strtolower($word);
}
}
echo Palindrome::isPalindrome('deleveled');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment