|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-01-28 14:50 UTC] jani@php.net
[2010-01-29 10:00 UTC] rthompson at mx dot itmedia dot co dot jp
[2010-02-17 00:17 UTC] svn@php.net
[2010-02-17 00:19 UTC] joey@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 02:00:01 2025 UTC |
Description: ------------ Through at least version 5.2.9, ip2long() returned the input value unchanged for valid integer IP address inputs. Since at least version 5.2.11, ip2long() returns "false" for all integer IP address inputs. (5.2.12 and 5.2.11 tested, 5.2.10 untested). Our application has been utilizing this function for the past three years, originally deployed on 5.1.(6?). Since both string and long IP addresses returned valid long results, the function returned valid results regardless of the format. This is useful when importing from data sources containing inconsistent representations. The specification of the function's valid input and outputs has been changed and made more restrictive, yet there is no changelog entry documenting this incompatible change. Reproduce code: --------------- --- From manual page: function.ip2long#Changelog --- echo ip2long("73.150.2.210"); echo ip2long(1234567890); Expected result: ---------------- Expected return value (through 5.2.9) is the integer "1234567890" for both inputs. Actual result: -------------- Actual return value (since 5.2.11 or .10) is "false" for the long input, correct for the string input.