Doc #67065 [Opn->Nab]: Incorrect documentation for 'ip2long'
| From: | krakjoe@php.net | Date: | Thu, 17 Apr 2014 06:50:09 +0000 |
| Subject: | Doc #67065 [Opn->Nab]: Incorrect documentation for 'ip2long' | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11155@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67065&edit=1
ID: 67065
Updated by: krakjoe@php.net
Reported by: bsasser at sindtech dot net
Summary: Incorrect documentation for 'ip2long'
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
Operating System: n/a
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
You seem to be incorrectly under the impression that IPv4 somehow means dotted address; it does not.
There is nothing wrong with the descriptions of these functions, they behave as they are documented;
you simply misunderstood the documentation.
Previous Comments:
------------------------------------------------------------------------
[2014-04-13 17:50:32] bsasser at sindtech dot net
Description:
------------
---
From manual page: http://www.php.net/function.ip2long (specifically http://us2.php.net/manual/en/function.ip2long.php
)
---
1) The first line incorrectly states:
"ip2long â Converts a string containing an (IPv4) Internet Protocol dotted address into a
proper address"
This function is to convert IPv4 address to long integers (hence the name - 'ip2long').
The incorrect statement above applies to long2ip().
2) The Description correctly shows:
int ip2long ( string $ip_address )
The statement under the above incorrectly shows:
"The function ip2long() generates an IPv4 Internet network address from its Internet standard
format (dotted string) representation."
That is not the purpose of this function (see #1).
3) Under Parameters it states:
"ip_address
A standard format address."
which is correct.
Under Return Values it states:
"Returns the IPv4 address or FALSE if ip_address is invalid."
which is incorrect.
It is not what this function does (see #1).
Test script:
---------------
n/a
Expected result:
----------------
Technically accurate documentation ;-)
Actual result:
--------------
What looks like document editing done late at night. See Description.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67065&edit=1