ID: 44892 Updated by: [EMAIL PROTECTED] Reported By: anthony dot morris at bankofamerica dot com -Status: Open +Status: Bogus Bug Type: Network related Operating System: Multiple PHP Version: 5.2.6 New Comment:
That is expected. "All numbers supplied as parts in IPv4 dotted decimal notation may be decimal, octal, or hexadecimal, as specified in the ISO C standard (that is, a leading 0x or 0X implies hexadecimal; otherwise, a leading '0' implies octal; otherwise, the number is interpreted as decimal)." - http://www.opengroup.org/onlinepubs/000095399/functions/inet_addr.html Previous Comments: ------------------------------------------------------------------------ [2008-05-02 15:20:48] anthony dot morris at bankofamerica dot com Description: ------------ IP2Long does not handle leading zeroes Reproduce code: --------------- <?PHP echo LONG2IP(IP2LONG('192.068.068.068')); ?> OR <?PHP echo IP2LONG('192.068.068.068'); echo '<br>'; echo IP2LONG('192.68.68.68'); ?> Expected result: ---------------- Notice the top example should return back the same IP. The bottom example, should produce the same LONG number. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44892&edit=1