php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66063 output wrong in filter_var documentation
Submitted: 2013-11-08 13:52 UTC Modified: 2013-11-16 23:21 UTC
From: christian dot brown at cbs dot com Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: christian dot brown at cbs dot com
New email:
PHP Version: OS:

 

 [2013-11-08 13:52 UTC] 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.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-09 05:10 UTC] 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-09 18:03 UTC] whatthejeff@php.net
The description for this bug is slightly off. The IP and integer examples are actually correct.
 [2013-11-16 23:21 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=332134
Log: Clarify this example a bit more (Re bug #66063)
 [2013-11-16 23:21 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2013-11-16 23:21 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2013-11-20 04:16 UTC] whatthejeff@php.net
Kalle,

Your update makes the first example inconsistent with the other examples on the page which all print variable names instead of values.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 16:01:31 2024 UTC