note 113638 deleted from filter.examples.validation by sobak
| From: | sobak@php.net | Date: | Fri, 25 Nov 2016 08:07:19 +0000 |
| Subject: | note 113638 deleted from filter.examples.validation by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207675@lists.php.net to get a copy of this message | ||
Note Submitter: brokendocs at php dot net
----
all the above documentation is slightly incorrect, the output is not reading the variables in -
code:
$email_a = 'joe@example.com';
$email_b = 'bogus';
if (filter_var($email_a, FILTER_VALIDATE_EMAIL)) {
echo "This ($email_a) email address is considered valid.";
}
output:
This (email_a) email address is considered valid.
should be output:
This (joe@example.com) email address is considered valid.
same for the IP and integer examples.