Doc #66063 [Com]: output wrong in filter_var documentation
| From: | whatthejeff@php.net | Date: | Sat, 09 Nov 2013 18:03:16 +0000 |
| Subject: | Doc #66063 [Com]: output wrong in filter_var documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10599@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66063&edit=1
ID: 66063
Comment by: whatthejeff@php.net
Reported by: christian dot brown at cbs dot com
Summary: output wrong in filter_var documentation
Status: Open
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
The description for this bug is slightly off. The IP and integer examples are actually correct.
Previous Comments:
------------------------------------------------------------------------
[2013-11-09 05:10:52] whatthejeff@php.net
Automatic comment from SVN on behalf of whatthejeff
Revision: http://svn.php.net/viewvc/?view=revision&revision=332088
Log: #66063 Make output from first filter example consistent with other filter examples
------------------------------------------------------------------------
[2013-11-08 13:52:33] christian dot brown at cbs dot com
Description:
------------
---
From manual page: http://www.php.net/filter.examples.validation
---
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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66063&edit=1