Doc #67066 [Opn->Nab]: Incorrect documentation for 'long2ip'
| From: | krakjoe@php.net | Date: | Thu, 17 Apr 2014 06:50:45 +0000 |
| Subject: | Doc #67066 [Opn->Nab]: Incorrect documentation for 'long2ip' | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11156@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67066&edit=1
ID: 67066
Updated by: krakjoe@php.net
Reported by: bsasser at sindtech dot net
Summary: Incorrect documentation for 'long2ip'
-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:58:36] bsasser at sindtech dot net
Description:
------------
---
From manual page: http://www.php.net/function.long2ip (specifically http://us2.php.net/manual/en/function.long2ip.php
)
---
This has similar issues to he ones I just submitted for ip2long.
1) First line states:
"long2ip â Converts an (IPv4) Internet network address into a string in Internet standard
dotted format"
It "converts an (IPv4) Internet network address into a string in Internet standard dotted
format"? What's the point of converting it to what we already have? (BTW it is
"Dotted Quad Notation" and/or "Dotted Decimal Notation").
This line makes no sense. It should say something like "Converts a long integer to an IPv4
network address in Dotted Quad Notation."
2) Description states:
string long2ip ( string $proper_address )
$proper_address is incorrect. You don't pass it an IPv4 address to get an IPv4 address, you
pass it a long integer. The statement underneath incorrectly states:
"The function long2ip() generates an Internet address in dotted format (i.e.: aaa.bbb.ccc.ddd)
from the proper address representation. "
Again, this makes no sense. Why convert it from 'the proper address representation' to
'an Internet address'? See #1 above for more clarity.
3) Parameter states:
"proper_address
A proper address representation."
See #2. You don't pass it a "proper address" so it can return a "proper
address", you pass it a long integer.
Test script:
---------------
n/a
Expected result:
----------------
Technically accurate documentation.
Actual result:
--------------
What appears to be late night editing of documentation.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67066&edit=1