4 function utf8_strtolower($str): string {
5 return mb_strtolower($str, 'utf-8');
8 function normalize_email($email, $strip_slashes = false): string {
9 $ret_email = trim(utf8_strtolower($email), " \t\r\n\0\x0B.");
11 $ret_email = stripslashes($ret_email);
16 <<__EntryPoint
>> function main(): void
{
17 var_dump(normalize_email('xxxxxxxxxx@yyyyy.com'.str_repeat(' ',1518)));