|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gasper at kozak dot si
New email:
PHP Version: OS:


 [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-2022 The PHP Group
All rights reserved.
Last updated: Sat Aug 13 06:05:43 2022 UTC