mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added function examples for: touch, strtolower and strstr
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@19919 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
22ff77fc31
commit
0ebc0b5f06
2 changed files with 26 additions and 1 deletions
|
@ -1913,6 +1913,16 @@ $tmpfname = tempnam ("/tmp", "FOO");
|
|||
</para>
|
||||
<para>
|
||||
Returns true on success and false otherwise.
|
||||
<example>
|
||||
<title><function>touch</function> example</title>
|
||||
<programlisting role="php">
|
||||
if ( touch($FileName) ) {
|
||||
print "$FileName modification time has been changed to todays date and time";
|
||||
} else {
|
||||
print "Sorry Could Not change modification time of $FileName";
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1771,7 +1771,16 @@ echo str_repeat("-=", 10);
|
|||
If <parameter>needle</parameter> is not found, returns false.</para>
|
||||
<para>
|
||||
If <parameter>needle</parameter> is not a string, it is converted
|
||||
to an integer and applied as the ordinal value of a character.</para>
|
||||
to an integer and applied as the ordinal value of a character.
|
||||
<example>
|
||||
<title><function>strstr</function> example</title>
|
||||
<programlisting>
|
||||
$email = 'sterling@designmultimedia.com';
|
||||
$domain = strstr($email, '@');
|
||||
print $domain; // prints designmultimedia.com
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>stristr</function>,
|
||||
<function>strrchr</function>, <function>substr</function>, and
|
||||
|
@ -1843,6 +1852,12 @@ echo str_repeat("-=", 10);
|
|||
Note that 'alphabetic' is determined by the current locale. This
|
||||
means that in i.e. the default "C" locale, characters such as
|
||||
umlaut-A (Ä) will not be converted.</para>
|
||||
<example>
|
||||
<title><function>strtolower</function> example</title>
|
||||
<programlisting>
|
||||
$str = "Mary Had A Little Lamb and She LOVED It So";
|
||||
$str = strtolower($str);
|
||||
print $str; # Prints mary had a little lamb and she loved it so
|
||||
<para>
|
||||
See also <function>strtoupper</function>
|
||||
and <function>ucfirst</function>.</para>
|
||||
|
|
Loading…
Reference in a new issue