- 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
This commit is contained in:
Derick Rethans 2001-05-20 00:50:14 +00:00
parent b3a19355d9
commit 5be0872015
2 changed files with 19 additions and 1 deletions

View file

@ -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;
?>
</programlisting>
</example>
</para>
<para>
This second example shows how to print a converted address with the
printf function:
<example>
<title><function>IP Adres displaying</function> Example</title>
<programlisting role="php">
&lt;?php
$ip = gethostbyname("www.php.net");
printf ("%u\n", ip2long ($ip));
echo $out;
?&gt;
</programlisting>
</example>

View file

@ -1891,7 +1891,11 @@ soundex ("Lukasiewicz") == soundex ("Lissajous") == 'L222';
</member>
<member>
<literal>d</literal> - the argument is treated as an
integer, and presented as a decimal number.
integer, and presented as a (signed) decimal number.
</member>
<member>
<literal>u</literal> - the argument is treated as an
integer, and presented as an unsigned decimal number.
</member>
<member>
<literal>f</literal> - the argument is treated as a double,