note 92751 modified in function.filter-var by danbrown

From: Date: Fri, 07 Aug 2009 14:46:14 +0000
Subject: note 92751 modified in function.filter-var by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159190@lists.php.net to get a copy of this message
If PHP >= 5.2 is not present, you can use the regular expression of the original PHP-c-file: http://svn.php.net/viewvc/php/php-src/trunk/ext/filter/logical_filters.c Instead of: <?php filter_var('bob@example.com', FILTER_VALIDATE_EMAIL)); ?> Just use preg_match(); with a copy of the original regular expression (found in the void "php_filter_validate_email") in logical_filters.c in fact, this expression (and the original filter-funktion) ignores RFC 5321 (Section 4.5.3.1. Size Limits and Minimums). --was-- If PHP >= 5.2 is not present, you can use the regular expression of the original PHP-c-file: http://svn.php.net/ viewvc/php/php-src/trunk/ ext/filter/logical_filters.c (sorry for linebrankes, wont let me post it without) Instead of: filter_var('bob@example.com', FILTER_VALIDATE_EMAIL)); Just use preg_match(); with a copy of the original regular expression (found in the void "php_filter_validate_email") in logical_filters.c in fact, this expression (and the original filter-funktion) ignores RFC 5321 (Section 4.5.3.1. Size Limits and Minimums). http://php.net/manual/en/function.filter-var.php

« previous php.notes (#159190) next »