Does PHP's filter_var FILTER_VALIDATE_EMAIL actually work?

前端 未结 4 2032
一个人的身影
一个人的身影 2020-11-27 16:23

After reading various posts I decided not to use REGEX to check if an email is valid and simply use PHP\'s inbuilt filter_var function. It seemed to work ok, until it starte

4条回答
  •  感情败类
    2020-11-27 17:07

    that filter has been revamped recently. http://codepad.org/Lz5m2S2N - appears that in version used by codepad your case is filtered correctly

    You can also look at http://bugs.php.net/49576 and http://svn.php.net/viewvc/php/php-src/trunk/ext/filter/logical_filters.c . Regexp is quite scary.

提交回复
热议问题