From 5be087201594aedc90ebec50d25363c726935e42 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Sun, 20 May 2001 00:50:14 +0000 Subject: [PATCH] - Added the %u modifier to sprintf(). - Added an example to ip2long, which shows how to print it with the %u modifier. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@47910 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/network.xml | 14 ++++++++++++++ functions/strings.xml | 6 +++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/functions/network.xml b/functions/network.xml index 1282d0bd03..809bf31546 100644 --- a/functions/network.xml +++ b/functions/network.xml @@ -515,6 +515,20 @@ $ip = gethostbyname("www.php.net"); $out = "The following URLs are equivalent:<br>\n"; $out .= "http://www.php.net/, http://".$ip."/, and http://".ip2long($ip)."/<br>\n"; echo $out; +?> + + + + + This second example shows how to print a converted address with the + printf function: + + <function>IP Adres displaying</function> Example + +<?php +$ip = gethostbyname("www.php.net"); +printf ("%u\n", ip2long ($ip)); +echo $out; ?> diff --git a/functions/strings.xml b/functions/strings.xml index 7c8b5d6db7..6e0b7f4d0e 100644 --- a/functions/strings.xml +++ b/functions/strings.xml @@ -1891,7 +1891,11 @@ soundex ("Lukasiewicz") == soundex ("Lissajous") == 'L222'; d - the argument is treated as an - integer, and presented as a decimal number. + integer, and presented as a (signed) decimal number. + + + u - the argument is treated as an + integer, and presented as an unsigned decimal number. f - the argument is treated as a double,