Sample valid e-mail address:
"this is a valid address"@example.com
PHP code:
<?php
header('Content-Type: text/plain');
$email = '"this is a valid address"@example.com';
$checked = filter_var($email, FILTER_VALIDATE_EMAIL);
var_dump($email, $checked);
Output on one server: (PHP Version 5.2.6):
string(37) ""this is a valid address"@example.com"
string(37) ""this is a valid address"@example.com"
phpinfo()
:
Input Validation and Filtering enabled
Revision $Revision: 1.52.2.42 $
Directive Local Value Master Value
filter.default unsafe_raw unsafe_raw
filter.default_flags no value no value
Output on another server (PHP Version 5.3.3):
string(37) ""this is a valid address"@example.com"
bool(false)
phpinfo()
:
Input Validation and Filtering enabled
Revision $Revision: 298196 $
Directive Local Value Master Value
filter.default unsafe_raw unsafe_raw
filter.default_flags no value no value
I cannot see anything in the documentation to suggest that this has changed, so perhaps it's some other configuration setting.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…