According to php documentation (http://php.net/manual/en/function.preg-match.php) function preg_match returns values of type integer (0 or 1) or FALSE, never TRUE.
So the above statement "Return value: TRUE if the address is in a valid format" is misleading.

Comments

jhodgdon’s picture

Status: Active » Closed (duplicate)

This has already been reported:
#505730: valid_email_address: wrong return type

A patch has also been proposed there. If someone would review the patch, we could get it committed...