- preg_replace: documentation ( source)
- strtolower: documentation ( source)
<?php
class Palindrome
{
public static function isPalindrome($str)
{
$s = strToLower(preg_replace('/[^A-Za-z]/', '', $str));
echo $s;
throw new Exception('Not implemented');
}
}
// For testing purposes (do not submit uncommented):
echo Palindrome::isPalindrome('Noel sees Leon.');