mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
Clarifying function returns.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@41846 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a835f6f64e
commit
1644bcf50b
1 changed files with 44 additions and 40 deletions
|
@ -247,7 +247,7 @@ $new_string = chunk_split (base64_encode($data));
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function converts the given string from one Cyrillic
|
||||
This function returns the given string from one Cyrillic
|
||||
character set to another. The <parameter>from</parameter> and
|
||||
<parameter>to</parameter> arguments are single characters that
|
||||
represent the source and target Cyrillic character sets. The
|
||||
|
@ -394,7 +394,7 @@ $new_string = chunk_split (base64_encode($data));
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>crypt</function> will encrypt a string using the
|
||||
<function>crypt</function> will return an encrypted string using the
|
||||
standard Unix <abbrev>DES</abbrev> encryption method. Arguments
|
||||
are a string to be encrypted and an optional two-character salt
|
||||
string to base the encryption on. See the Unix man page for your
|
||||
|
@ -952,7 +952,7 @@ $colon_separated = implode (":", $array);
|
|||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>levenshtein</function></funcdef>
|
||||
<funcdef>int <function>levenshtein</function></funcdef>
|
||||
<paramdef>string <parameter>str1</parameter></paramdef>
|
||||
<paramdef>string <parameter>str2</parameter></paramdef>
|
||||
</funcprototype>
|
||||
|
@ -972,10 +972,10 @@ $colon_separated = implode (":", $array);
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function returns the Levenshtein-Distance between the
|
||||
This function returns the Levenshtein-Distance between the
|
||||
two argument strings or -1, if one of the argument strings
|
||||
is longer than the limit of 255 characters (255 should be
|
||||
more than enough for name or dictionary comparison, and
|
||||
more than enough for name or dictionary comparison, and
|
||||
nobody serious would be doing genetic analysis with PHP).
|
||||
</para>
|
||||
<para>
|
||||
|
@ -1266,8 +1266,8 @@ echo "</PRE>\n";
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function strips whitespace from the start of a string and
|
||||
returns the stripped string. The whitespace
|
||||
This function returns a string with whitespace stripped from the
|
||||
beginning of <parameter>str</parameter>. The whitespace
|
||||
characters it currently strips are: "\n", "\r", "\t", "\v", "\0",
|
||||
and a plain space.
|
||||
</para>
|
||||
|
@ -1294,7 +1294,7 @@ echo "</PRE>\n";
|
|||
<para>
|
||||
Calculates the MD5 hash of <parameter>str</parameter> using the
|
||||
<ulink url="&url.rfc;rfc1321.html">RSA Data Security, Inc.
|
||||
MD5 Message-Digest Algorithm</ulink>.
|
||||
MD5 Message-Digest Algorithm</ulink>, and returns that hash.
|
||||
</para>
|
||||
<para>
|
||||
See also: <function>crc32</function>
|
||||
|
@ -1476,8 +1476,8 @@ echo $second[1]; /* prints "another" */
|
|||
</simpara>
|
||||
<simpara>
|
||||
See also: <function>print</function>, <function>sprintf</function>,
|
||||
<function>sscanf</function>, <function>fscanf</function>,
|
||||
and <function>flush</function>.
|
||||
<function>sscanf</function>, <function>fscanf</function>,
|
||||
and <function>flush</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -2136,8 +2136,9 @@ if (!strcasecmp ($var1, $var2)) {
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function tries to strip all HTML and PHP tags from the given
|
||||
string. It errors on the side of caution in case of incomplete
|
||||
This function tries to return a string with all HTML and PHP
|
||||
tags stripped from a given <parameter>str</parameter>,
|
||||
It errors on the side of caution in case of incomplete
|
||||
or bogus tags. It uses the same tag stripping state machine as
|
||||
the <function>fgetss</function> function.
|
||||
</para>
|
||||
|
@ -2453,9 +2454,9 @@ Array
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This functions pads the <parameter>input</parameter> string on
|
||||
the left, the right, or both sides to the specifed padding
|
||||
length. If the optional argument
|
||||
This functions returns the <parameter>input</parameter> string
|
||||
padded on the left, the right, or both sides to the specifed
|
||||
padding length. If the optional argument
|
||||
<parameter>pad_string</parameter> is not supplied, the
|
||||
<parameter>input</parameter> is padded with spaces, otherwise it
|
||||
is padded with characters from <parameter>pad_string</parameter>
|
||||
|
@ -2944,7 +2945,7 @@ print $str; # Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
|
|||
<refnamediv>
|
||||
<refname>str_replace</refname>
|
||||
<refpurpose>
|
||||
Replace all occurrences of the search string in subject with the replacement string
|
||||
Replace all occurrences of the search string with the replacement string
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
|
@ -2958,19 +2959,20 @@ print $str; # Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function replaces all occurences of <parameter>search</parameter> in
|
||||
<parameter>subject</parameter> with the given
|
||||
<parameter>replace</parameter> value. If you don't need fancy replacing
|
||||
rules, you should always use this function instead of
|
||||
<function>ereg_replace</function> or
|
||||
<function>preg_replace</function>.</para>
|
||||
This function returns a string or an array with all occurences of
|
||||
<parameter>search</parameter> in <parameter>subject</parameter>
|
||||
replaced with the given <parameter>replace</parameter> value. If
|
||||
you don't need fancy replacing rules, you should always use this
|
||||
function instead of <function>ereg_replace</function> or
|
||||
<function>preg_replace</function>.
|
||||
</para>
|
||||
<para>
|
||||
In PHP 4.0.5 and later, every parameter to
|
||||
<function>str_replace</function> can be an array.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>subject</parameter> is an array, then the search and replace
|
||||
is performed on every entry of <parameter>subject</parameter>, and the
|
||||
is performed with every entry of <parameter>subject</parameter>, and the
|
||||
return value is an array as well.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -3024,10 +3026,10 @@ $bodytag = str_replace ("%body%", "black", "<body text=%body%>");
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function operates on <parameter>str</parameter>, translating
|
||||
all occurrences of each character in <parameter>from</parameter>
|
||||
to the corresponding character in <parameter>to</parameter> and
|
||||
returning the result.
|
||||
This function returns a copy of <parameter>str</parameter>,
|
||||
translating all occurrences of each character in
|
||||
<parameter>from</parameter> to the corresponding character in
|
||||
<parameter>to</parameter> and returning the result.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>from</parameter> and <parameter>to</parameter> are
|
||||
|
@ -3205,7 +3207,7 @@ print substr_count("This is a test", "is"); // prints out 2
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>substr_replace</function> replaces the part of
|
||||
<function>substr_replace</function> replaces a copy of
|
||||
<parameter>string</parameter> delimited by the
|
||||
<parameter>start</parameter> and (optionally)
|
||||
<parameter>length</parameter> parameters with the string given in
|
||||
|
@ -3284,10 +3286,10 @@ echo substr_replace ($var, '', 10, -1) . "<br>\n";
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function strips whitespace from the start and the end of a
|
||||
string and returns the stripped string. The whitespace
|
||||
characters it currently strips are: "\n", "\r", "\t", "\v", "\0",
|
||||
and a plain space.
|
||||
This function returns a string with whitespace stripped from
|
||||
the beginning and end of <parameter>str</parameter>. The
|
||||
whitespace characters it currently strips are: "\n", "\r", "\t",
|
||||
"\v", "\0", and a plain space.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>chop</function>, <function>rtrim</function> and
|
||||
|
@ -3310,8 +3312,9 @@ echo substr_replace ($var, '', 10, -1) . "<br>\n";
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Capitalizes the first character of <parameter>str</parameter> if
|
||||
that character is alphabetic.
|
||||
Retuns a string with the first character of
|
||||
<parameter>str</parameter> capitalized, if that character is
|
||||
alphabetic.
|
||||
</para>
|
||||
<para>
|
||||
Note that 'alphabetic' is determined by the current locale. For
|
||||
|
@ -3349,8 +3352,9 @@ $text = ucfirst ($text); // $text is now Mary had a little lamb
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Capitalizes the first character of each word in
|
||||
<parameter>str</parameter> if that character is alphabetic.
|
||||
Retuns a string with the first character of each word in
|
||||
<parameter>str</parameter> capitalized, if that character is
|
||||
alphabetic.
|
||||
<example>
|
||||
<title><function>ucwords</function> example</title>
|
||||
<programlisting role="php">
|
||||
|
@ -3402,10 +3406,10 @@ $text = ucwords($text); // $text is now: Mary Had A Little
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Wraps the string <parameter>str</parameter> at the column number
|
||||
specified by the (optional) <parameter>width</parameter>
|
||||
parameter. The line is broken using the (optional)
|
||||
<parameter>break</parameter> parameter.
|
||||
Returns a string with <parameter>str</parameter> wrapped
|
||||
at the column number specified by the (optional)
|
||||
<parameter>width</parameter> parameter. The line is broken
|
||||
using the (optional) <parameter>break</parameter> parameter.
|
||||
</para>
|
||||
<para>
|
||||
<function>wordwrap</function> will automatically wrap at column
|
||||
|
|
Loading…
Reference in a new issue