- str_replace: documentation ( source)
<?php
class Palindrome
{
public static function isPalindrome($str)
{
$s = str_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.');