Doc #55472 [Opn->Ana]: ip2long(integer) returns integer
| From: | laruence@php.net | Date: | Sun, 21 Aug 2011 10:19:19 +0000 |
| Subject: | Doc #55472 [Opn->Ana]: ip2long(integer) returns integer | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7040@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55472&edit=1
ID: 55472
Updated by: laruence@php.net
Reported by: php at linuxhosted dot ca
Summary: ip2long(integer) returns integer
-Status: Open
+Status: Analyzed
Type: Documentation Problem
Package: *Network Functions
Operating System: Windows
PHP Version: 5.3.7
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2011-08-21 10:10:40] laruence@php.net
in the OS without inet_ntop, php ip2long use inet_addr handle the conversion,
obviously there are difference between these two function when meet a not well-
format numbers-and-dots notation.
http://www.kernel.org/doc/man-pages/online/pages/man3/inet_pton.3.html
http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/commtrf2/inet_addr.
htm
maybe the document should be more clearly to explain the difference?
------------------------------------------------------------------------
[2011-08-21 03:09:36] php at linuxhosted dot ca
Description:
------------
On windows, the ip2long function does not return false on an invalid input, on other operating
systems it properly returns false.
Test script:
---------------
var_dump(ip2long(26));
Expected result:
----------------
bool(false)
Actual result:
--------------
int(26)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55472&edit=1