Bug #51920 [Opn->Bgs]: ip2long result depends on platform

From: Date: Wed, 26 May 2010 10:42:49 +0000
Subject: Bug #51920 [Opn->Bgs]: ip2long result depends on platform
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-150835@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51920&edit=1

 ID:               51920
 Updated by:       pajoye@php.net
 Reported by:      olafvdspek at gmail dot com
 Summary:          ip2long result depends on platform
-Status:           Open
+Status:           Bogus
 Type:             Bug
 Package:          Network related
 Operating System: Debian x64
 PHP Version:      5.3.2

 New Comment:

See the example in the PHP manual to know how to print out unsigned
integer.


Previous Comments:
------------------------------------------------------------------------
[2010-05-26 12:39:32] olafvdspek at gmail dot com

Description:
------------
The result of ip2long depends on the plaform. It shouldn't.

Test script:
---------------
<?php
echo ip2long('192.0.34.166');

x86: -1073732954
x64: 3221234342

Expected result:
----------------
-1073732954

Actual result:
--------------
3221234342


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51920&edit=1


Thread (14 messages)

« previous php.bugs (#150835) next »