Created
May 14, 2019 16:19
-
-
Save dikiwidia/7d3f7998967a4d53f0443a910d11f1ba to your computer and use it in GitHub Desktop.
Menjawab pertanyaan : https://www.testdome.com/questions/php/palindrome/7320?visibility=1&skillId=5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Palindrome | |
{ | |
public static function isPalindrome($word) | |
{ | |
$wd = strtolower($word); | |
if ($wd == strrev($wd)){ | |
return true; | |
} | |
return false; | |
} | |
} | |
echo Palindrome::isPalindrome('Deleveled'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment