Skip to content

Instantly share code, notes, and snippets.

@igun997
Created May 18, 2019 10:47
Show Gist options
  • Save igun997/d13c2a2d9e69a5284edf866ef8afd19e to your computer and use it in GitHub Desktop.
Save igun997/d13c2a2d9e69a5284edf866ef8afd19e to your computer and use it in GitHub Desktop.
BE_PHP #1
<?php
class Palindrome
{
public static function isPalindrome($word)
{
$word = strtolower($word);
$temp1 = $word;
$temp2 = strrev($word);
if($temp1 == $temp2){
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