@ 2013-02-16T03:59:09Z <?php
$valid = array
(
'name@domain.com',
'name2@domain.com',
'l3tt3rsAndNumb3rs@domain.com',
'has-dash@domain.com',
'hasApostrophe.o\'leary@domain.org',
'uncommonTLD@domain.museum',
'uncommonTLD@domain.travel',
'uncommonTLD@domain.mobi',
'countryCodeTLD@domain.uk',
'countryCodeTLD@domain.rw',
'lettersInDomain@911.com',
'underscore_inLocal@domain.net',
'IPInsteadOfDomain@127.0.0.1',
'IPAndPort@127.0.0.1:25',
'subdomain@sub.domain.com',
'local@dash-inDomain.com',
'dot.inLocal@foo.com',
'a@singleLetterLocal.org',
'singleLetterDomain@x.org',
'&*=?^+{}\'~@validCharsInLocal.net',
);
$invalid = array
(
'missingDomain@.com',
'@missingLocal.org',
'missingatSign.net',
'missingDot@com',
'two@@signs.com',
'colonButNoPort@127.0.0.1:',
'someone-else@127.0.0.1.26',
'.localStartsWithDot@domain.com',
'localEndsWithDot.@domain.com',
'two..consecutiveDots@domain.com',
'domainStartsWithDash@-domain.com',
'domainEndsWithDash@domain-.com',
'TLDDoesntExist@domain.moc',
'numbersInTLD@domain.c0m',
'missingTLD@domain.',
'! "#$%(),/;<>[]`|@invalidCharsInLocal.org',
'invalidCharsInDomain@! "#$%(),/;<>_[]`|.org',
'local@SecondLevelDomainNamesAreInvalidIfTheyAreLongerThan64Charactersss.org',
'name@example.domain
);
function valid($email)
{
echo filter_var($email, FILTER_VALIDATE_EMAIL) !== FALSE ? ' Valid' : 'Invalid',"\t\t{$email}\n";
}
echo "Should be valid\n====================\n";
array_walk($valid, 'valid');
echo "\n\nShould be invalid\n====================\n";
array_walk($invalid, 'valid');
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 5.4.11 0.433 0.037 16.48 5.4.10 0.430 0.033 16.32 5.4.9 0.383 0.037 16.64 5.4.8 0.380 0.033 16.46 5.4.7 0.353 0.033 16.42 5.4.6 0.397 0.037 16.46 5.4.5 0.373 0.037 16.61 5.4.4 0.387 0.037 16.19 5.4.3 0.460 0.037 16.45 5.4.2 0.367 0.030 16.41 5.4.1 0.360 0.033 16.47 5.4.0 0.367 0.027 15.85 5.3.21 0.377 0.040 14.54 5.3.20 0.393 0.040 14.50 5.3.19 0.410 0.050 14.52 5.3.18 0.370 0.040 14.48 5.3.17 0.360 0.033 14.50 5.3.16 0.407 0.043 14.52 5.3.15 0.383 0.037 14.51 5.3.14 0.363 0.030 14.50 5.3.13 0.383 0.037 14.48 5.3.12 0.363 0.037 14.49 5.3.11 0.343 0.030 14.45 5.3.10 0.367 0.027 14.01 5.3.9 0.353 0.047 13.99 5.3.8 0.360 0.037 13.99 5.3.7 0.357 0.037 13.94 5.3.6 0.340 0.033 13.96 5.3.5 0.367 0.030 13.89 5.3.4 0.367 0.033 13.79 5.3.3 0.327 0.037 13.75 5.3.2 0.340 0.037 13.63 5.3.1 0.387 0.033 13.50 5.3.0 0.367 0.027 13.57
preferences:dark mode live preview
135.24 ms | 1394 KiB | 7 Q