|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-16 12:25 UTC] vrana@php.net
[2007-08-16 22:18 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 09:00:02 2025 UTC |
Description: ------------ Documentation for ip2long needs a little more detail. It says that it returns FALSE if the argument passed is not a valid IP address, and says this returned -1 before version 5. It should also mention that if it is passed an empty argument that it will still return -1. Reproduce code: --------------- <?php echo "<br />Result: " . ip2long("10.10.10.10"); // returns long echo "<br />Result: " . ip2long("not.an.ip.address"); // returns FALSE echo "<br />Result: " . ip2long(""); // should return FALSE, returns -1 ?> Expected result: ---------------- Result: 168430090 Result: Result: Actual result: -------------- Result: 168430090 Result: Result: -1