note 113638 added to filter.examples.validation
| From: | brokendocs@php.net | Date: | Fri, 08 Nov 2013 13:50:27 +0000 |
| Subject: | note 113638 added to filter.examples.validation | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-197464@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 72.52.91.14
Probable Submitter: 72.52.91.14
----
Manual Page -- http://php.net/manual/en/filter.examples.validation.php
Edit -- https://master.php.net/note/edit/113638
Del: integrated -- https://master.php.net/note/delete/113638/integrated
Del: useless -- https://master.php.net/note/delete/113638/useless
Del: bad code -- https://master.php.net/note/delete/113638/bad+code
Del: spam -- https://master.php.net/note/delete/113638/spam
Del: non-english -- https://master.php.net/note/delete/113638/non-english
Del: in docs -- https://master.php.net/note/delete/113638/in+docs
Del: other reasons-- https://master.php.net/note/delete/113638
Reject -- https://master.php.net/note/reject/113638
Search -- https://master.php.net/manage/user-notes.php