From:             marrtins at hackers dot lv
Operating system: Linux 2.4.20
PHP version:      4.3.1
PHP Bug Type:     *Network Functions
Bug description:  ip2long() and long2ip() results differs.

Description:
------------
Should ip address '62.234.229.040' differ from '62.234.229.40' ? I think
not. Please check it out!

Reproduce code:
---------------
<?php

printf("%u\n", ip2long('62.234.229.040')); // 1055581472
print long2ip('1055581472')."\n"; // 62.234.229.32
printf("%u\n", ip2long('62.234.229.40')); // 1055581480

?>

Expected result:
----------------
1055581480
62.234.229.32
1055581480


Actual result:
--------------
1055581472
62.234.229.32
1055581480


-- 
Edit bug report at http://bugs.php.net/?id=25612&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25612&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25612&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25612&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25612&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25612&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25612&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25612&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25612&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25612&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25612&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25612&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25612&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25612&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25612&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25612&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25612&r=float

Reply via email to