|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
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 Dec 03 21:01:23 2020 UTC