Doc #72448 [Opn->Nab]: Missing $ in echo text
| From: | cmb@php.net | Date: | Sun, 19 Jun 2016 15:14:24 +0000 |
| Subject: | Doc #72448 [Opn->Nab]: Missing $ in echo text | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13557@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72448&edit=1
ID: 72448
Updated by: cmb@php.net
Reported by: eric at schorvitz dot com
Summary: Missing $ in echo text
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2016-06-18 23:06:30] eric at schorvitz dot com
Description:
------------
---
From manual page: http://www.php.net/filter.examples.validation
---
<?php
$ip_a = '127.0.0.1';
$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)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72448&edit=1