|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54338 docs don't mention that ip2long on 64-bit doesn't return negative values
Submitted: 2011-03-21 16:13 UTC Modified: 2011-03-22 03:50 UTC
From: gasper at kozak dot si Assigned: aharvey (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2011-03-21 16:13 UTC] gasper at kozak dot si
Documentation for explicitly states in Notes that 
"many IP addresses will result in negative integers". However, this isn't the 
case with 64-bit PHP, and I think this is important enough to be mentioned there. 
This isn't a problem with negative numbers, just with missing documentation.

The test script shows an example that will return a negative value on 32-bit, and 
non-negative on 64-bit PHP.

Test script:
echo ip2long('');


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-22 03:50 UTC]
Automatic comment from SVN on behalf of aharvey
Log: Fix doc bug #54338 (docs don't mention that ip2long on 64-bit doesn't return
negative values).
 [2011-03-22 03:50 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: aharvey
 [2011-03-22 03:50 UTC]
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Oct 03 02:01:24 2023 UTC