mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- 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:
parent
b3a19355d9
commit
5be0872015
2 changed files with 19 additions and 1 deletions
|
@ -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">
|
||||
<?php
|
||||
$ip = gethostbyname("www.php.net");
|
||||
printf ("%u\n", ip2long ($ip));
|
||||
echo $out;
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue