|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72448 Missing $ in echo text
Submitted: 2016-06-18 23:06 UTC Modified: 2016-06-19 15:14 UTC
From: eric at schorvitz dot com Assigned: cmb (profile)
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: eric at schorvitz dot com
New email:
PHP Version: OS:


 [2016-06-18 23:06 UTC] eric at schorvitz dot com
From manual page:

$ip_a = '';
$ip_b = '42.42';

if (filter_var($ip_a, FILTER_VALIDATE_IP)) {
    echo "This (ip_a) IP address is considered valid.";
if (filter_var($ip_b, FILTER_VALIDATE_IP)) {
    echo "This (ip_b) IP address is considered valid.";

This (ip_a) should be: This ($ip_a)
This (ip_b) should be: This ($ip_b)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-19 15:14 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2016-06-19 15:14 UTC]
Have a look at the expected output:

| This (ip_a) IP address is considered valid.

That wouldn't match for $ip_a. Of course, the output could be
changed, but what would that be good for? The example already
shows, that the first IP address is considered valid, while the
second is not.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Oct 29 14:01:44 2020 UTC