ID: 10681
Updated by: derick
Old-Status: Open
Status: Feedback
Bug Type: Network related
Operating system: 
PHP Version: 4.0 Latest CVS (05/05/2001)
Assigned To: 

Sounds ok to me, are you willing to make a patch for this?

Previous Comments:

[2001-05-05 04:40:03] [EMAIL PROTECTED]
$ipaslong = ip2long("");
print long2ip($ipaslong)."n";
print bin2hex(pack("N", $ipaslong))."n";

That script run with PHP 4.0.5 prints:

whereas with the latest CVS version it prints:

That makes that function completely unusable for me (and for others probably too). I 
have another proposal for fixing bug #9698, and that is implementing %u as a sprintf 
format specifier to output unsigned longs instead of signed.

This way he could use the following script for his problem (should go onto the ip2long 
page then):
$ip = gethostbyname("");
$out = sprintf("http://%u/<br>n", ip2long($ip));
echo $out;

If that fix would be accepted (and the other fix rolled back), I could add %u to 
sprintf myself and post it here.


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to