|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
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-2018 The PHP Group
All rights reserved.
Last updated: Thu Sep 20 04:01:26 2018 UTC