[PHP-DEV] cvs: /phpdoc/functions strings.sgml From: Egon Schmid (eschmid <email protected>)
Date: 09/13/99

eschmid Mon Sep 13 14:07:19 1999 EDT

  Modified files:
    /phpdoc/functions strings.sgml
  Log:
  More cosmetics.
  
Index: phpdoc/functions/strings.sgml
diff -u phpdoc/functions/strings.sgml:1.14 phpdoc/functions/strings.sgml:1.15
--- phpdoc/functions/strings.sgml:1.14 Mon Sep 13 12:48:55 1999
+++ phpdoc/functions/strings.sgml Mon Sep 13 14:07:16 1999
@@ -3,16 +3,16 @@
   <title>String functions</title>
   <titleabbrev>Strings</titleabbrev>
   <partintro>
- <simpara>
+ <simpara>
     These functions all manipulate strings in various ways. Some more
- specialized sections can be found in the regular expression and URL
- handling sections.
+ specialized sections can be found in the regular expression and
+ URL handling sections.
   </partintro>
 
   <refentry id="function.addcslashes">
    <refnamediv>
     <refname>AddCSlashes</refname>
- <refpurpose>quote string with slashes in a C style</refpurpose>
+ <refpurpose>Quote string with slashes in a C style</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -22,26 +22,31 @@
      <paramdef>string <parameter>charlist</parameter></paramdef>
     </funcsynopsis>
     <para>
- Returns a string with backslashes before characters that are listed
- in <parameter>charlist</parameter> parameter. It escapes
- <literal>\n</literal>, <literal>\r</literal> etc. in C-like style,
- characters with ASCII code lower than 32 and higher than 126 are
- converted to octal representation. Be carefull when escaping alphanumeric
- characters. You can specify a range in <parameter>charlist</parameter>
- like "\0..\37", which would escape all characters with ASCII code
- between 0 and 31.
+ Returns a string with backslashes before characters that are
+ listed in <parameter>charlist</parameter> parameter. It escapes
+ <literal>\n</literal>, <literal>\r</literal> etc. in C-like
+ style, characters with ASCII code lower than 32 and higher than
+ 126 are converted to octal representation. Be carefull when
+ escaping alphanumeric characters. You can specify a range in
+ <parameter>charlist</parameter> like "\0..\37", which would
+ escape all characters with ASCII code between 0 and 31.
      <example>
       <title>addcslashes() example</title>
       <programlisting>
 $escaped = addcslashes($not_escaped, "\0..\37!@\177..\377");
 </programlisting></example>
 
- <simpara>
- Added in PHP4b3-dev.
+ <note>
+ <simpara>
+ Added in PHP4b3-dev.
+ </note>
 
     <para>
- See also <function>stripcslashes</function>, <function>stripslashes</function>, <function>htmlspecialchars</function>
- <function>htmlspecialchars</function> and <function>quotemeta</function>.
+ See also <function>stripcslashes</function>,
+ <function>stripslashes</function>,
+ <function>htmlspecialchars</function>,
+ <function>htmlspecialchars</function>, and
+ <function>quotemeta</function>.
 
    </refsect1>
   </refentry>
@@ -49,7 +54,7 @@
   <refentry id="function.addslashes">
    <refnamediv>
     <refname>AddSlashes</refname>
- <refpurpose>quote string with slashes</refpurpose>
+ <refpurpose>Quote string with slashes</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -65,8 +70,9 @@
      and NUL (the null byte).
 
     <para>
- See also <function>stripslashes</function>, <function>htmlspecialchars</function>
- and <function>quotemeta</function>.
+ See also <function>stripslashes</function>,
+ <function>htmlspecialchars</function>, and
+ <function>quotemeta</function>.
 
    </refsect1>
   </refentry>
@@ -74,7 +80,9 @@
   <refentry id="function.bin2hex">
    <refnamediv>
     <refname>bin2hex</refname>
- <refpurpose>convert binary data into hexadecimal representation</refpurpose>
+ <refpurpose>
+ Convert binary data into hexadecimal representation
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -83,9 +91,9 @@
      <paramdef>string <parameter>str</parameter></paramdef>
     </funcsynopsis>
     <para>
- Returns an ASCII string containing the hexadecimal representation of
- <parameter>str</parameter>. The conversion is done byte-wise with
- the high-nibble first.
+ Returns an ASCII string containing the hexadecimal representation
+ of <parameter>str</parameter>. The conversion is done byte-wise
+ with the high-nibble first.
 
    </refsect1>
   </refentry>
@@ -117,7 +125,7 @@
   <refentry id="function.chr">
    <refnamediv>
     <refname>Chr</refname>
- <refpurpose>return a specific character</refpurpose>
+ <refpurpose>Return a specific character</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -129,7 +137,7 @@
      Returns a one-character string containing the character specified
      by <parameter>ascii</parameter>.
      <example>
- <title>chr() example</title>
+ <title><function>chr</function> example</title>
       <programlisting>
 $str .= chr(27); /* add an escape character at the end of $str */
 
@@ -168,7 +176,7 @@
      <parameter>end</parameter> (defaults to "\r\n"). It returns the
      new string leaving the original string untouched.
      <example>
- <title>chunk_split() example</title>
+ <title><function>chunk_split</function> example</title>
       <programlisting>
 # format $data using RFC 2045 semantics
 
@@ -189,7 +197,9 @@
   <refentry id="function.convert-cyr-string">
    <refnamediv>
     <refname>convert_cyr_string</refname>
- <refpurpose>Convert from one Cyrillic character set to another</refpurpose>
+ <refpurpose>
+ Convert from one Cyrillic character set to another
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -200,10 +210,11 @@
      <paramdef>string <parameter>to</parameter></paramdef>
     </funcsynopsis>
     <para>
- This function converts 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 supported types are:
+ This function converts 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
+ supported types are:
      <itemizedlist>
       <listitem><simpara>
          k - koi8-r
@@ -231,7 +242,9 @@
     <funcsynopsis>
      <funcdef>string <function>crypt</function></funcdef>
      <paramdef>string <parameter>str</parameter></paramdef>
- <paramdef>string <parameter><optional>salt</optional></parameter></paramdef>
+ <paramdef>string
+ <parameter><optional>salt</optional></parameter>
+ </paramdef>
     </funcsynopsis>
 
     <para>
@@ -239,35 +252,54 @@
      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
- crypt function for more information.
- <simpara>
- If the salt argument is not provided, it will be randomly generated
- by PHP.
- <simpara>
- Some operating systems support more than one type of encryption.
- In fact, sometimes the standard DES encryption is replaced by an
- MD5 based encryption algorithm. The encryption type is triggered by
- the salt argument. At install time, PHP determines the capabilities
- of the crypt function and will accept salts for other encryption
- types. If no salt is provided, PHP will auto-generate a standard
- 2-character DES salt by default unless the default encryption type
- on the system is MD5 in which case a random MD5-compatible salt
- is generated. PHP sets a constant named CRYPT_SALT_LENGTH which
- tells you whether a regular 2-character salt applies to your system
- or the longer 12-char MD5 salt is applicable.
- <simpara>
- The standard DES encryption <function>crypt</function> contains
- the salt as the first two characters of the output.
- <simpara>
- On systems where the crypt() function supports multiple encryption
- types, the following constants are set to 0 or 1 depending on whether
- the given type is available:
- <itemizedlist>
- <listitem><simpara>CRYPT_STD_DES - Standard DES encryption with a 2-char SALT</simpara></listitem>
- <listitem><simpara>CRYPT_EXT_DES - Extended DES encryption with a 9-char SALT</simpara></listitem>
- <listitem><simpara>CRYPT_MD5 - MD5 encryption with a 12-char SALT starting with $1$</simpara></listitem>
- <listitem><simpara>CRYPT_BLOWFISH - Extended DES encryption with a 16-char SALT starting with $2$</simpara></listitem>
- </itemizedlist>
+ crypt function for more information.
+ <simpara>
+ If the salt argument is not provided, it will be randomly
+ generated by PHP.
+ <simpara>
+ Some operating systems support more than one type of encryption.
+ In fact, sometimes the standard DES encryption is replaced by an
+ MD5 based encryption algorithm. The encryption type is triggered
+ by the salt argument. At install time, PHP determines the
+ capabilities of the crypt function and will accept salts for
+ other encryption types. If no salt is provided, PHP will
+ auto-generate a standard 2-character DES salt by default unless
+ the default encryption type on the system is MD5 in which case a
+ random MD5-compatible salt is generated. PHP sets a constant
+ named CRYPT_SALT_LENGTH which tells you whether a regular
+ 2-character salt applies to your system or the longer 12-char MD5
+ salt is applicable.
+ <simpara>
+ The standard DES encryption <function>crypt</function> contains
+ the salt as the first two characters of the output.
+ <simpara>
+ On systems where the crypt() function supports multiple
+ encryption types, the following constants are set to 0 or 1
+ depending on whether the given type is available:
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ CRYPT_STD_DES - Standard DES encryption with a 2-char SALT
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ CRYPT_EXT_DES - Extended DES encryption with a 9-char SALT
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ CRYPT_MD5 - MD5 encryption with a 12-char SALT starting with
+ $1$
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ CRYPT_BLOWFISH - Extended DES encryption with a 16-char SALT
+ starting with $2$
+ </simpara>
+ </listitem>
+ </itemizedlist>
         
     <simpara>
      There is no decrypt function, since <function>crypt</function>
@@ -278,14 +310,16 @@
   <refentry id="function.echo">
    <refnamediv>
     <refname>echo</refname>
- <refpurpose>output one or more strings</refpurpose>
+ <refpurpose>Output one or more strings</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
     <funcsynopsis>
      <funcdef><function>echo</function></funcdef>
      <paramdef>string <parameter>arg1</parameter></paramdef>
- <paramdef>string <parameter><optional>argn</optional>...</parameter></paramdef>
+ <paramdef>string
+ <parameter><optional>argn</optional>...</parameter>
+ </paramdef>
     </funcsynopsis>
     <simpara>
      Outputs all parameters.
@@ -304,16 +338,16 @@
 
     <note>
      <para>
- In fact, if you want to pass more than one parameter to
- echo, you must not enclose the parameters within parentheses.
+ In fact, if you want to pass more than one parameter to echo,
+ you must not enclose the parameters within parentheses.
      </para>
     </note>
 
     <simpara>
      See also:
- <function>print</function>
- <function>printf</function>
- <function>flush</function>
+ <function>print</function>,
+ <function>printf</function>, and
+ <function>flush</function>.
 
    </refsect1>
   </refentry>
@@ -321,7 +355,7 @@
   <refentry id="function.explode">
    <refnamediv>
     <refname>explode</refname>
- <refpurpose>split a string by string</refpurpose>
+ <refpurpose>Split a string by string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -336,7 +370,7 @@
      <replaceable>separator</replaceable>.
 
      <example>
- <title>explode() example</title>
+ <title><function>explode</function> example</title>
       <programlisting>
 $pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
 $pieces = explode(" ", $pizza);
@@ -352,7 +386,7 @@
   <refentry id="function.flush">
    <refnamediv>
     <refname>flush</refname>
- <refpurpose>flush the output buffer</refpurpose>
+ <refpurpose>Flush the output buffer</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -371,8 +405,10 @@
   <refentry id="function.get-meta-tags">
    <refnamediv>
     <refname>get_meta_tags</refname>
- <refpurpose>Extracts all meta tag content attributes from a file
- and returns an array</refpurpose>
+ <refpurpose>
+ Extracts all meta tag content attributes from a file and returns
+ an array
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -380,7 +416,8 @@
      <funcdef>array <function>get_meta_tags</function></funcdef>
      <paramdef>string <parameter>filename</parameter></paramdef>
      <paramdef>int
- <parameter><optional>use_include_path</optional></parameter></paramdef>
+ <parameter><optional>use_include_path</optional></parameter>
+ </paramdef>
     </funcsynopsis>
     <para>
      Opens <parameter>filename</parameter> and parses it line by line
@@ -394,19 +431,17 @@
 &lt;/head> &lt;!-- parsing stops here -->
 </programlisting></example>
 
- (pay attention to line endings - PHP uses a native function to parse
- the input, so a Mac file won't work on Unix).
+ (pay attention to line endings - PHP uses a native function to
+ parse the input, so a Mac file won't work on Unix).
 
     <para>
-
      The value of the name property becomes the key, the value of the
      content property becomes the value of the returned array, so you
      can easily use standard array functions to traverse it or access
      single values. Special characters in the value of the name
      property are substituted with '_', the rest is converted to lower
      case.
-
- <para>
+ <para>
      Setting <parameter>use_include_path</parameter> to 1 will result
      in PHP trying to open the file along the standard include path.
    </refsect1>
@@ -415,7 +450,9 @@
   <refentry id="function.htmlentities">
    <refnamediv>
     <refname>htmlentities</refname>
- <refpurpose>Convert all applicable characters to HTML entities.</refpurpose>
+ <refpurpose>
+ Convert all applicable characters to HTML entities
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -423,15 +460,13 @@
      <funcdef>string <function>htmlentities</function></funcdef>
      <paramdef>string <parameter>string</parameter></paramdef>
     </funcsynopsis>
-
     <para>
- This function is identical to <function>htmlspecialchars</function> in
- all ways, except that all characters which have HTML entity
- equivalents are translated into these entities.
-
+ This function is identical to
+ <function>htmlspecialchars</function> in all ways, except that
+ all characters which have HTML entity equivalents are translated
+ into these entities.
     <para>
      At present, the ISO-8859-1 character set is used.
-
     <para>
      See also <function>htmlspecialchars</function> and
      <function>nl2br</function>.
@@ -441,8 +476,10 @@
 
   <refentry id="function.htmlspecialchars">
    <refnamediv>
- <refname>htmlspecialchars</refname>
- <refpurpose>Convert special characters to HTML entities.</refpurpose>
+ <refname>htmlspecialchars</refname>
+ <refpurpose>
+ Convert special characters to HTML entities
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -450,18 +487,15 @@
      <funcdef>string <function>htmlspecialchars</function></funcdef>
      <paramdef>string <parameter>string</parameter></paramdef>
     </funcsynopsis>
-
     <para>
      Certain characters have special significance in HTML, and should
      be represented by HTML entities if they are to preserve their
      meanings. This function returns a string with these conversions
      made.
-
     <simpara>
- This function is useful in preventing user-supplied text from
- containing HTML markup, such as in a message board or
- guest book application.
-
+ This function is useful in preventing user-supplied text from
+ containing HTML markup, such as in a message board or guest book
+ application.
     <para>
      At present, the translations that are done are:
      <itemizedlist>
@@ -481,10 +515,12 @@
 
     <para>
      Note that this functions does not translate anything beyond what
- is listed above. For full entity translation, see <function>htmlentities</function>.
+ is listed above. For full entity translation, see
+ <function>htmlentities</function>.
         
     <para>
- See also <function>htmlentities</function> and <function>nl2br</function>.
+ See also <function>htmlentities</function> and
+ <function>nl2br</function>.
 
    </refsect1>
   </refentry>
@@ -492,7 +528,7 @@
   <refentry id="function.implode">
    <refnamediv>
     <refname>implode</refname>
- <refpurpose>join array elements with a string</refpurpose>
+ <refpurpose>Join array elements with a string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -521,7 +557,7 @@
   <refentry id="function.join">
    <refnamediv>
     <refname>join</refname>
- <refpurpose>join array elements with a string</refpurpose>
+ <refpurpose>Join array elements with a string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -540,7 +576,10 @@
 
   <refentry id="function.ltrim">
    <refnamediv>
- <refname>ltrim</refname> <refpurpose>Strip whitespace from the beginning of a string.</refpurpose>
+ <refname>ltrim</refname>
+ <refpurpose>
+ Strip whitespace from the beginning of a string
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -549,10 +588,11 @@
      <paramdef>string <parameter>str</parameter></paramdef>
     </funcsynopsis>
 
- <para>
- This function strips whitespace from the start of a string and returns the stripped string.
- <para>
- See also <function>chop</function> and <function>trim</function>.
+ <para>
+ This function strips whitespace from the start of a string and
+ returns the stripped string.
+ <para>
+ See also <function>chop</function> and <function>trim</function>.
 
    </refsect1>
   </refentry>
@@ -560,7 +600,7 @@
   <refentry id="function.md5">
    <refnamediv>
     <refname>md5</refname>
- <refpurpose>calculate the md5 hash of a string</refpurpose>
+ <refpurpose>Calculate the md5 hash of a string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -580,7 +620,7 @@
   <refentry id="function.metaphone">
    <refnamediv>
     <refname>Metaphone</refname>
- <refpurpose>calculate the metaphone key of a string</refpurpose>
+ <refpurpose>Calculate the metaphone key of a string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -635,7 +675,7 @@
   <refentry id="function.ord">
    <refnamediv>
     <refname>Ord</refname>
- <refpurpose>return ASCII value of character</refpurpose>
+ <refpurpose>Return ASCII value of character</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -648,10 +688,10 @@
      <parameter>string</parameter>. This function complements
      <function>chr</function>.
      <example>
- <title>ord() example</title>
+ <title><function>ord</function> example</title>
       <programlisting>
 if (ord($str) == 10) {
- echo("The first character of \$str is a line feed.\n");
+ echo "The first character of \$str is a line feed.\n";
 }
 </programlisting></example>
 
@@ -664,7 +704,7 @@
   <refentry id="function.parse-str">
    <refnamediv>
     <refname>parse_str</refname>
- <refpurpose>parses the string into variables</refpurpose>
+ <refpurpose>Parses the string into variables</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -694,7 +734,7 @@
   <refentry id="function.print">
    <refnamediv>
     <refname>print</refname>
- <refpurpose>output a string</refpurpose>
+ <refpurpose>Output a string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -724,7 +764,9 @@
     <funcsynopsis>
      <funcdef>int <function>printf</function></funcdef>
      <paramdef>string <parameter>format</parameter></paramdef>
- <paramdef>mixed <parameter><optional>args</optional></parameter>...</paramdef>
+ <paramdef>mixed
+ <parameter><optional>args</optional></parameter>...
+ </paramdef>
     </funcsynopsis>
 
     <simpara>
@@ -748,13 +790,16 @@
    <refsect1>
     <title>Description</title>
     <funcsynopsis>
- <funcdef>string <function>quoted_printable_decode</function></funcdef>
+ <funcdef>string
+ <function>quoted_printable_decode</function>
+ </funcdef>
      <paramdef>string <parameter>str</parameter></paramdef>
     </funcsynopsis>
- <simpara>
- This function returns an 8-bit binary string corresponding to the decoded
- quoted printable string. This function is similar to <function>imap_qprint</function>,
- except this one does not require the IMAP module to work.
+ <simpara>
+ This function returns an 8-bit binary string corresponding to the
+ decoded quoted printable string. This function is similar to
+ <function>imap_qprint</function>, except this one does not
+ require the IMAP module to work.
    </refsect1>
   </refentry>
 
@@ -787,7 +832,7 @@
   <refentry id="function.rawurldecode">
    <refnamediv>
     <refname>rawurldecode</refname>
- <refpurpose>decode URL-encoded strings</refpurpose>
+ <refpurpose>Decode URL-encoded strings</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -799,8 +844,8 @@
      Returns a string in which the sequences with percent
      (<literal>%</literal>) signs followed by two hex digits have been
      replaced with literal characters. For example, the string
- <screen>foo%20bar%40baz</screen> decodes into
- <screen>foo bar <email protected></screen>
+ <screen>foo%20bar%40baz</screen> decodes into <screen>foo
+ bar <email protected></screen>
 
     <simpara>
      See also <function>rawurlencode</function>.
@@ -829,7 +874,7 @@
      with character conversions (like some email systems). For
      example, if you want to include a password in an ftp url:
      <example>
- <title>rawurlencode() example 1</title>
+ <title><function>rawurlencode</function> example 1</title>
       <programlisting>
 echo '&lt;A HREF="ftp://user:', rawurlencode ('foo @+%/'),
      ' <email protected>/x.txt">';
@@ -838,7 +883,7 @@
      Or, if you pass information in a path info component of the url:
 
      <example>
- <title>rawurlencode() example 2</title>
+ <title><function>rawurlencode</function> example 2</title>
       <programlisting>
 echo '&lt;A HREF="http://x.com/department_list_script/',
      rawurlencode ('sales and marketing/Miami'), '">';
@@ -853,7 +898,7 @@
   <refentry id="function.setlocale">
    <refnamediv>
     <refname>setlocale</refname>
- <refpurpose>set locale information</refpurpose>
+ <refpurpose>Set locale information</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -866,20 +911,39 @@
      <parameter>category</parameter> is a string specifying the
      category of the functions affected by the locale setting:
      <itemizedlist>
- <listitem><simpara>
- LC_ALL for all of the below
- </simpara></listitem><listitem><simpara>
- LC_COLLATE for string comparison - not currently implemented in PHP
- </simpara></listitem><listitem><simpara>
- LC_CTYPE for character classification and conversion, for
- example <function>strtoupper</function>
- </simpara></listitem><listitem><simpara>
- LC_MONETARY for localeconv() - not currently implemented in PHP
- </simpara></listitem><listitem><simpara>
- LC_NUMERIC for decimal separator
- </simpara></listitem><listitem><simpara>
- LC_TIME for date and time formatting with <function>strftime</function>
- </simpara></listitem>
+ <listitem>
+ <simpara>
+ LC_ALL for all of the below
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ LC_COLLATE for string comparison - not currently implemented in PHP
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ LC_CTYPE for character classification and conversion, for
+ example <function>strtoupper</function>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ LC_MONETARY for localeconv() - not currently implemented in
+ PHP
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ LC_NUMERIC for decimal separator
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ LC_TIME for date and time formatting with
+ <function>strftime</function>
+ </simpara>
+ </listitem>
      </itemizedlist>
 
     <para>
@@ -904,7 +968,7 @@
   <refentry id="function.similar-text">
    <refnamediv>
     <refname>similar_text</refname>
- <refpurpose>calculate the similarity between two strings</refpurpose>
+ <refpurpose>Calculate the similarity between two strings</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -912,28 +976,31 @@
      <funcdef>int <function>similar_text</function></funcdef>
      <paramdef>string <parameter>first</parameter></paramdef>
      <paramdef>string <parameter>second</parameter></paramdef>
- <paramdef>double <parameter><optional>percent</optional></parameter></paramdef>
+ <paramdef>double
+ <parameter><optional>percent</optional></parameter>
+ </paramdef>
     </funcsynopsis>
    
     <para>
- This calculates the similarity between two strings as
- described in Oliver [1993]. Note that this implementation does
- not use a stack as in Oliver's pseudo code, but recursive calls
- which may or may not speed up the whole process. Note also
- that the complexity of this algorithm is O(N**3) where N
- is the length of the longest string.
+ This calculates the similarity between two strings as described
+ in Oliver [1993]. Note that this implementation does not use a
+ stack as in Oliver's pseudo code, but recursive calls which may
+ or may not speed up the whole process. Note also that the
+ complexity of this algorithm is O(N**3) where N is the length of
+ the longest string.
      
     <para>
- By passing a reference as third argument, <function>similar_text</function>
- will calculate the similarity in percent for you. It returns
- the number of matching chars in both strings.
+ By passing a reference as third argument,
+ <function>similar_text</function> will calculate the similarity
+ in percent for you. It returns the number of matching chars in
+ both strings.
    </refsect1>
   </refentry>
     
   <refentry id="function.soundex">
    <refnamediv>
     <refname>soundex</refname>
- <refpurpose>calculate the soundex key of a string</refpurpose>
+ <refpurpose>Calculate the soundex key of a string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -944,17 +1011,16 @@
 
     <para>
      Calculates the soundex key of <parameter>str</parameter>.
-
- <para>
- Soundex keys have the property that words pronounced similarly produce the
- same soundex key, and can thus be used to simplify searches in databases
- where you know the pronunciation but not the spelling. This soundex function
- returns a string 4 characters long, starting with a letter.
-
     <para>
- This particular soundex function is one described by Donald Knuth in "The Art Of Computer Programming,
- vol. 3: Sorting And Searching", Addison-Wesley (1973), pp. 391-392.
-
+ Soundex keys have the property that words pronounced similarly
+ produce the same soundex key, and can thus be used to simplify
+ searches in databases where you know the pronunciation but not
+ the spelling. This soundex function returns a string 4 characters
+ long, starting with a letter.
+ <para>
+ This particular soundex function is one described by Donald Knuth
+ in "The Art Of Computer Programming, vol. 3: Sorting And
+ Searching", Addison-Wesley (1973), pp. 391-392.
     <para>
      <example>
       <title>Soundex Examples</title>
@@ -972,14 +1038,16 @@
   <refentry id="function.sprintf">
    <refnamediv>
     <refname>sprintf</refname>
- <refpurpose>return a formatted string</refpurpose>
+ <refpurpose>Return a formatted string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
     <funcsynopsis>
      <funcdef><function>sprintf</function></funcdef>
      <paramdef>string <parameter>format</parameter></paramdef>
- <paramdef>mixed <parameter><optional>args</optional></parameter>...</paramdef>
+ <paramdef>mixed
+ <parameter><optional>args</optional></parameter>...
+ </paramdef>
     </funcsynopsis>
 
     <simpara>
@@ -992,104 +1060,90 @@
      copied directly to the result, and <emphasis>conversion
      specifications</emphasis>, each of which results in fetching its
      own parameter. This applies to both <function>sprintf</function>
- and <function>printf</function>
+ and <function>printf</function>.
 
     <para>
      Each conversion specification consists of these elements, in
      order:
      <orderedlist>
- <listitem><simpara>
-
- An optional <emphasis>padding specifier</emphasis> that says
- what character will be used for padding the results to the
- right string size. This may be a space character or a
- <literal>0</literal> (zero character). The default is to pad
- with spaces. An alternate padding character can be specified
- by prefixing it with a single quote (<literal>'</literal>).
- See the examples below.
-
- <listitem><simpara>
-
- An optional <emphasis>alignment specifier</emphasis> that says
- if the result should be left-justified or right-justified.
- The default is right-justified; a <literal>-</literal>
- character here will make it left-justified.
-
- <listitem><simpara>
-
- An optional number, a <emphasis>width specifier</emphasis>
- that says how many characters (minimum) this conversion should
- result in.
-
- <listitem><simpara>
-
- An optional <emphasis>precision specifier</emphasis> that says
- how many decimal digits should be displayed for floating-point
- numbers. This option has no effect for other types than
- double. (Another function useful for formatting numbers is
+ <listitem>
+ <simpara>
+ An optional <emphasis>padding specifier</emphasis> that says
+ what character will be used for padding the results to the
+ right string size. This may be a space character or a
+ <literal>0</literal> (zero character). The default is to pad
+ with spaces. An alternate padding character can be specified
+ by prefixing it with a single quote (<literal>'</literal>).
+ See the examples below.
+ <listitem>
+ <simpara>
+ An optional <emphasis>alignment specifier</emphasis> that says
+ if the result should be left-justified or right-justified.
+ The default is right-justified; a <literal>-</literal>
+ character here will make it left-justified.
+ <listitem>
+ <simpara>
+ An optional number, a <emphasis>width specifier</emphasis>
+ that says how many characters (minimum) this conversion should
+ result in.
+ <listitem>
+ <simpara>
+ An optional <emphasis>precision specifier</emphasis> that says
+ how many decimal digits should be displayed for floating-point
+ numbers. This option has no effect for other types than
+ double. (Another function useful for formatting numbers is
         <function>number_format</function>.)
-
- <listitem><para>
-
- A <emphasis>type specifier</emphasis> that says what type the
- argument data should be treated as. Possible types:
- <simplelist>
-
- <member>
- <literal>%</literal> - a literal percent character. No
- argument is required.
- </member>
-
- <member>
- <literal>b</literal> - the argument is treated as an
- integer, and presented as a binary number.
- </member>
-
- <member>
- <literal>c</literal> - the argument is treated as an
- integer, and presented as the character with that ASCII
- value.
- </member>
-
- <member>
- <literal>d</literal> - the argument is treated as an
- integer, and presented as a decimal number.
- </member>
-
- <member>
- <literal>f</literal> - the argument is treated as a double,
- and presented as a floating-point number.
- </member>
-
- <member>
- <literal>o</literal> - the argument is treated as an
- integer, and presented as an octal number.
- </member>
-
- <member>
- <literal>s</literal> - the argument is treated as and
- presented as a string.
- </member>
-
- <member>
- <literal>x</literal> - the argument is treated as an
- integer and presented as a hexadecimal number (with
- lowercase letters).
- </member>
-
- <member>
- <literal>X</literal> - the argument is treated as an
- integer and presented as a hexadecimal number (with
- uppercase letters).
- </member>
-
- </simplelist>
-
+ <listitem>
+ <para>
+ A <emphasis>type specifier</emphasis> that says what type the
+ argument data should be treated as. Possible types:
+
+ <simplelist>
+ <member>
+ <literal>%</literal> - a literal percent character. No
+ argument is required.
+ </member>
+ <member>
+ <literal>b</literal> - the argument is treated as an
+ integer, and presented as a binary number.
+ </member>
+ <member>
+ <literal>c</literal> - the argument is treated as an
+ integer, and presented as the character with that ASCII
+ value.
+ </member>
+ <member>
+ <literal>d</literal> - the argument is treated as an
+ integer, and presented as a decimal number.
+ </member>
+ <member>
+ <literal>f</literal> - the argument is treated as a double,
+ and presented as a floating-point number.
+ </member>
+ <member>
+ <literal>o</literal> - the argument is treated as an
+ integer, and presented as an octal number.
+ </member>
+ <member>
+ <literal>s</literal> - the argument is treated as and
+ presented as a string.
+ </member>
+ <member>
+ <literal>x</literal> - the argument is treated as an integer
+ and presented as a hexadecimal number (with lowercase
+ letters).
+ </member>
+ <member>
+ <literal>X</literal> - the argument is treated as an integer
+ and presented as a hexadecimal number (with uppercase
+ letters).
+ </member>
+ </simplelist>
      </orderedlist>
 
     <simpara>
- See also:
- <function>printf</function>, <function>number_format</function>
+ See also: <function>printf</function> and
+ <function>number_format</function>.
 
    </refsect1>
 
@@ -1120,7 +1174,9 @@
   <refentry id="function.strcasecmp">
    <refnamediv>
     <refname>strcasecmp</refname>
- <refpurpose>binary safe case-insensitive string comparison</refpurpose>
+ <refpurpose>
+ Binary safe case-insensitive string comparison
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1137,16 +1193,18 @@
 
     <simpara>
      See also <function>ereg</function>, <function>strcmp</function>,
- <function>substr</function>, <function>stristr</function>,
- and <function>strstr</function>.
+ <function>substr</function>, <function>stristr</function>, and
+ <function>strstr</function>.
  
    </refsect1>
   </refentry>
 
   <refentry id="function.strchr">
    <refnamediv>
- <refname>strchr</refname>
- <refpurpose>Find the first occurrence of a character.</refpurpose>
+ <refname>strchr</refname>
+ <refpurpose>
+ Find the first occurrence of a character.
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1166,7 +1224,7 @@
   <refentry id="function.strcmp">
    <refnamediv>
     <refname>strcmp</refname>
- <refpurpose>binary safe string comparison</refpurpose>
+ <refpurpose>Binary safe string comparison</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1185,9 +1243,9 @@
      Note that this comparison is case sensitive.
 
     <simpara>
- See also <function>ereg</function>, <function>strcasecmp</function>,
- <function>substr</function>, <function>stristr</function>,
- and <function>strstr</function>.
+ See also <function>ereg</function>,
+ <function>strcasecmp</function>, <function>substr</function>,
+ <function>stristr</function>, and <function>strstr</function>.
  
    </refsect1>
   </refentry>
@@ -1195,7 +1253,9 @@
   <refentry id="function.strcspn">
    <refnamediv>
     <refname>strcspn</refname>
- <refpurpose>find length of initial segment not matching mask</refpurpose>
+ <refpurpose>
+ Find length of initial segment not matching mask
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1205,8 +1265,9 @@
      <paramdef>string <parameter>str2</parameter></paramdef>
     </funcsynopsis>
     <simpara>
- Returns the length of the initial segment of <parameter>str1</parameter> which does
- <emphasis>not</emphasis> contain any of the characters in <parameter>str2</parameter>.
+ Returns the length of the initial segment of
+ <parameter>str1</parameter> which does <emphasis>not</emphasis>
+ contain any of the characters in <parameter>str2</parameter>.
 
     <simpara>
      See also <function>strspn</function>.
@@ -1249,10 +1310,11 @@
      C-like <literal>\n</literal>, <literal>\r</literal> ..., octal
      and hexadecimal representation.
 
+ <note>
+ <simpara>
+ Added in PHP4b3-dev.
+ </note>
     <simpara>
- Added in PHP4b3-dev.
-
- <simpara>
      See also <function>addcslashes</function>.
 
    </refsect1>
@@ -1261,7 +1323,7 @@
   <refentry id="function.stripslashes">
    <refnamediv>
     <refname>StripSlashes</refname>
- <refpurpose>un-quote string quoted with addslashes</refpurpose>
+ <refpurpose>Un-quote string quoted with addslashes</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1283,7 +1345,9 @@
   <refentry id="function.stristr">
    <refnamediv>
     <refname>stristr</refname>
- <refpurpose>Case-insensitive strstr().</refpurpose>
+ <refpurpose>
+ Case-insensitive <function>strstr</function>
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1292,31 +1356,27 @@
      <paramdef>string <parameter>haystack</parameter></paramdef>
      <paramdef>string <parameter>needle</parameter></paramdef>
     </funcsynopsis>
-
     <para>
      Returns all of <parameter>haystack</parameter> from the first
      occurrence of <parameter>needle</parameter> to the end.
      <parameter>needle</parameter> and <parameter>haystack</parameter>
      are examined in a case-insensitive manner.
-
     <para>
      If <parameter>needle</parameter> is not found, returns false.
-
     <para>
- If <parameter>needle</parameter> is not a string, it is converted to
- an integer and applied as the ordinal value of a character.
-
+ If <parameter>needle</parameter> is not a string, it is converted
+ to an integer and applied as the ordinal value of a character.
     <para>
- See also <function>strchr</function>, <function>strrchr</function>,
- <function>substr</function>, and <function>ereg</function>.
-
+ See also <function>strchr</function>,
+ <function>strrchr</function>, <function>substr</function>, and
+ <function>ereg</function>.
     </refsect1>
    </refentry>
 
   <refentry id="function.strlen">
    <refnamediv>
     <refname>strlen</refname>
- <refpurpose>get string length</refpurpose>
+ <refpurpose>Get string length</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1326,14 +1386,15 @@
     </funcsynopsis>
     <para>
      Returns the length of <parameter>string</parameter>.
-
    </refsect1>
   </refentry>
 
   <refentry id="function.strpos">
    <refnamediv>
     <refname>strpos</refname>
- <refpurpose>Find position of first occurrence of a string.</refpurpose>
+ <refpurpose>
+ Find position of first occurrence of a string
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1341,39 +1402,40 @@
      <funcdef>int <function>strpos</function></funcdef>
      <paramdef>string <parameter>haystack</parameter></paramdef>
      <paramdef>string <parameter>needle</parameter></paramdef>
- <paramdef>int <parameter><optional>offset</optional></parameter></paramdef>
+ <paramdef>int
+ <parameter><optional>offset</optional></parameter>
+ </paramdef>
     </funcsynopsis>
-
     <para>
- Returns the numeric position of the first occurrence of <parameter>needle</parameter>
- in the <parameter>haystack</parameter> string. Unlike the <function>strrpos</function>,
- this function can take a full string as the <parameter>needle</parameter> parameter and
- the entire string will be used.
-
+ Returns the numeric position of the first occurrence of
+ <parameter>needle</parameter> in the
+ <parameter>haystack</parameter> string. Unlike the
+ <function>strrpos</function>, this function can take a full
+ string as the <parameter>needle</parameter> parameter and the
+ entire string will be used.
     <para>
      If <parameter>needle</parameter> is not found, returns false.
-
- <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>
- The optional <parameter>offset</parameter> parameter allows you to
- specify which character in <parameter>haystack</parameter> to start
- searching. The position returned is still relative to the the beginning
- of <parameter>haystack</parameter>.
-
+ If <parameter>needle</parameter> is not a string, it is converted
+ to an integer and applied as the ordinal value of a character.
     <para>
- See also <function>strrpos</function>, <function>strrchr</function>,
- <function>substr</function>, <function>stristr</function>,
- and <function>strstr</function>.
-
+ The optional <parameter>offset</parameter> parameter allows you
+ to specify which character in <parameter>haystack</parameter> to
+ start searching. The position returned is still relative to the
+ the beginning of <parameter>haystack</parameter>.
+ <para>
+ See also <function>strrpos</function>,
+ <function>strrchr</function>, <function>substr</function>,
+ <function>stristr</function>, and <function>strstr</function>.
     </refsect1>
    </refentry>
 
   <refentry id="function.strrchr">
    <refnamediv>
     <refname>strrchr</refname>
- <refpurpose>Find the last occurrence of a character in a string.</refpurpose>
+ <refpurpose>
+ Find the last occurrence of a character in a string
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1382,26 +1444,22 @@
      <paramdef>string <parameter>haystack</parameter></paramdef>
      <paramdef>string <parameter>needle</parameter></paramdef>
     </funcsynopsis>
-
     <para>
      This function returns the portion of
- <parameter>haystack</parameter> which starts at the last occurrence of
- <parameter>needle</parameter> and goes until the end of
- <parameter>haystack</parameter>.
-
+ <parameter>haystack</parameter> which starts at the last
+ occurrence of <parameter>needle</parameter> and goes until the
+ end of <parameter>haystack</parameter>.
     <para>
      Returns false if <parameter>needle</parameter> is not found.
-
     <para>
- If <parameter>needle</parameter> contains more than one character,
- the first is used.
-
+ If <parameter>needle</parameter> contains more than one
+ character, the first is used.
     <para>
- If <parameter>needle</parameter> is not a string, it is converted to
- an integer and applied as the ordinal value of a character.
+ If <parameter>needle</parameter> is not a string, it is converted
+ to an integer and applied as the ordinal value of a character.
 
      <example>
- <title>strrchr() example</title>
+ <title><function>strrchr</function> example</title>
       <programlisting>
 // get last directory in $PATH
 $dir = substr( strrchr( $PATH, ":" ), 1 );
@@ -1413,8 +1471,8 @@
      </example>
 
     <para>
- See also <function>substr</function>, <function>stristr</function>,
- and <function>strstr</function>.
+ See also <function>substr</function>,
+ <function>stristr</function>, and <function>strstr</function>.
 
    </refsect1>
   </refentry>
@@ -1422,7 +1480,7 @@
   <refentry id="function.strrev">
    <refnamediv>
     <refname>strrev</refname>
- <refpurpose>Reverse a string.</refpurpose>
+ <refpurpose>Reverse a string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1430,17 +1488,17 @@
      <funcdef>string <function>strrev</function></funcdef>
      <paramdef>string <parameter>string</parameter></paramdef>
     </funcsynopsis>
-
     <para>
      Returns <parameter>string</parameter>, reversed.
-
    </refsect1>
   </refentry>
 
   <refentry id="function.strrpos">
    <refnamediv>
     <refname>strrpos</refname>
- <refpurpose>Find position of last occurrence of a char in a string.</refpurpose>
+ <refpurpose>
+ Find position of last occurrence of a char in a string
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1449,32 +1507,31 @@
      <paramdef>string <parameter>haystack</parameter></paramdef>
      <paramdef>char <parameter>needle</parameter></paramdef>
     </funcsynopsis>
-
     <para>
- Returns the numeric position of the last occurrence of <parameter>needle</parameter>
- in the <parameter>haystack</parameter> string. Note that the needle in this case can
- only be a single character. If a string is passed as the needle, then only the first
- character of that string will be used.
-
+ Returns the numeric position of the last occurrence of
+ <parameter>needle</parameter> in the
+ <parameter>haystack</parameter> string. Note that the needle in
+ this case can only be a single character. If a string is passed
+ as the needle, then only the first character of that string will
+ be used.
     <para>
      If <parameter>needle</parameter> is not found, returns false.
-
     <para>
- If <parameter>needle</parameter> is not a string, it is converted to
- an integer and applied as the ordinal value of a character.
-
+ If <parameter>needle</parameter> is not a string, it is converted
+ to an integer and applied as the ordinal value of a character.
     <para>
- See also <function>strpos</function>, <function>strrchr</function>,
- <function>substr</function>, <function>stristr</function>,
- and <function>strstr</function>.
-
+ See also <function>strpos</function>,
+ <function>strrchr</function>, <function>substr</function>,
+ <function>stristr</function>, and <function>strstr</function>.
     </refsect1>
    </refentry>
 
   <refentry id="function.strspn">
    <refnamediv>
     <refname>strspn</refname>
- <refpurpose>find length of initial segment matching mask</refpurpose>
+ <refpurpose>
+ Find length of initial segment matching mask
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1484,14 +1541,12 @@
      <paramdef>string <parameter>str2</parameter></paramdef>
     </funcsynopsis>
     <simpara>
- Returns the length of the initial segment of
- <parameter>str1</parameter> which consists entirely of
- characters in <parameter>str2</parameter>.
-
+ Returns the length of the initial segment of
+ <parameter>str1</parameter> which consists entirely of characters
+ in <parameter>str2</parameter>.
     <simpara>
      See also <function>strcspn</function>.
-
- </refsect1>
+ </refsect1>
   </refentry>
 
   <refentry id="function.strstr">
@@ -1506,29 +1561,25 @@
      <paramdef>string <parameter>haystack</parameter></paramdef>
      <paramdef>string <parameter>needle</parameter></paramdef>
     </funcsynopsis>
-
     <para>
      Returns all of <parameter>haystack</parameter> from the first
      occurrence of <parameter>needle</parameter> to the end.
-
     <para>
      If <parameter>needle</parameter> is not found, returns false.
-
     <para>
- If <parameter>needle</parameter> is not a string, it is converted to
- an integer and applied as the ordinal value of a character.
-
+ If <parameter>needle</parameter> is not a string, it is converted
+ to an integer and applied as the ordinal value of a character.
     <para>
- See also <function>stristr</function>, <function>strrchr</function>,
- <function>substr</function>, and <function>ereg</function>.
-
- </refsect1>
- </refentry>
+ See also <function>stristr</function>,
+ <function>strrchr</function>, <function>substr</function>, and
+ <function>ereg</function>.
+ </refsect1>
+ </refentry>
 
   <refentry id="function.strtok">
    <refnamediv>
     <refname>strtok</refname>
- <refpurpose>tokenize string</refpurpose>
+ <refpurpose>Tokenize string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1538,12 +1589,12 @@
      <paramdef>string <parameter>arg2</parameter></paramdef>
     </funcsynopsis>
     <para>
- <function>strtok</function> is used to tokenize a string. That is, if you have a
- string like "This is an example string" you could tokenize this
- string into its individual words by using the space character as
- the token.
+ <function>strtok</function> is used to tokenize a string. That
+ is, if you have a string like "This is an example string" you
+ could tokenize this string into its individual words by using the
+ space character as the token.
      <example>
- <title>strtok() example</title>
+ <title><function>strtok</function> example</title>
       <programlisting>
     $string = "This is an example string";
     $tok = strtok($string," ");
@@ -1551,8 +1602,8 @@
         echo "Word=$tok&lt;br>";
         $tok = strtok(" ");
     }
-</programlisting></example>
-
+ </programlisting>
+ </example>
     <para>
      Note that only the first call to strtok uses the string argument.
      Every subsequent call to strtok only needs the token to use, as
@@ -1562,22 +1613,19 @@
      multiple tokens in the token parameter. The string will be
      tokenized when any one of the characters in the argument are
      found.
-
     <para>
      Also be careful that your tokens may be equal to "0". This
      evaluates to false in conditional expressions.
-
     <para>
      See also <function>split</function> and
      <function>explode</function>.
-
    </refsect1>
   </refentry>
 
   <refentry id="function.strtolower">
    <refnamediv>
     <refname>strtolower</refname>
- <refpurpose>Make a string lowercase.</refpurpose>
+ <refpurpose>Make a string lowercase</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1585,16 +1633,13 @@
      <funcdef>string <function>strtolower</function></funcdef>
      <paramdef>string <parameter>str</parameter></paramdef>
     </funcsynopsis>
-
     <para>
      Returns <parameter>string</parameter> with all alphabetic
      characters converted to lowercase.
-
     <para>
      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>
      See also <function>strtoupper</function>
      and <function>ucfirst</function>.
@@ -1605,7 +1650,7 @@
   <refentry id="function.strtoupper">
    <refnamediv>
     <refname>strtoupper</refname>
- <refpurpose>Make a string uppercase.</refpurpose>
+ <refpurpose>Make a string uppercase</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1613,27 +1658,25 @@
      <funcdef>string <function>strtoupper</function></funcdef>
      <paramdef>string <parameter>string</parameter></paramdef>
     </funcsynopsis>
-
     <para>
      Returns <parameter>string</parameter> with all alphabetic
      characters converted to uppercase.
-
     <para>
      Note that 'alphabetic' is determined by the current locale. For
      instance, in the default "C" locale characters such as umlaut-a
      (ä) will not be converted.
-
- <para>
+ <para>
      See also <function>strtolower</function>
      and <function>ucfirst</function>.
-
    </refsect1>
   </refentry>
 
   <refentry id="function.str-replace">
    <refnamediv>
     <refname>str_replace</refname>
- <refpurpose>Replace all occurrences of needle in haystack with str</refpurpose>
+ <refpurpose>
+ Replace all occurrences of needle in haystack with str
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1643,35 +1686,30 @@
      <paramdef>string <parameter>str</parameter></paramdef>
      <paramdef>string <parameter>haystack</parameter></paramdef>
     </funcsynopsis>
-
     <para>
- This function replaces all occurences of <parameter>needle</parameter>
- in <parameter>haystack</parameter> with the given
- <parameter>str</parameter>. If you don't need fancy replacing
- rules, you should always use this function instead of
- <function>ereg_replace</function>.
+ This function replaces all occurences of
+ <parameter>needle</parameter> in <parameter>haystack</parameter>
+ with the given <parameter>str</parameter>. If you don't need
+ fancy replacing rules, you should always use this function
+ instead of <function>ereg_replace</function>.
     <para>
-
      <example>
       <title>str_replace() example</title>
       <programlisting>
 $bodytag = str_replace("%body%", "black", "&lt;body text=%body%>");
       </programlisting>
      </example>
-
     <para>
      This function is binary safe.
-
     <para>
      See also <function>ereg_replace</function>.
-
    </refsect1>
   </refentry>
 
   <refentry id="function.strtr">
    <refnamediv>
     <refname>strtr</refname>
- <refpurpose>Translate certain characters.</refpurpose>
+ <refpurpose>Translate certain characters</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1681,35 +1719,30 @@
      <paramdef>string <parameter>from</parameter></paramdef>
      <paramdef>string <parameter>to</parameter></paramdef>
     </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.
-
     <para>
      If <parameter>from</parameter> and <parameter>to</parameter> are
      different lengths, the extra characters in the longer of the two
      are ignored.
-
      <example>
       <title>strtr() example</title>
       <programlisting>
 $addr = strtr($addr, "äåö", "aao");
       </programlisting>
      </example>
-
     <para>
      See also <function>ereg_replace</function>.
-
    </refsect1>
   </refentry>
 
   <refentry id="function.substr">
    <refnamediv>
     <refname>substr</refname>
- <refpurpose>Return part of a string.</refpurpose>
+ <refpurpose>Return part of a string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -1717,65 +1750,72 @@
      <funcdef>string <function>substr</function></funcdef>
      <paramdef>string <parameter>string</parameter></paramdef>
      <paramdef>int <parameter>start</parameter></paramdef>
- <paramdef>int <parameter><optional>length</optional></parameter></paramdef>
+ <paramdef>int
+ <parameter><optional>length</optional></parameter>
+ </paramdef>
     </funcsynopsis>
-
     <para>
      Substr returns the portion of <parameter>string</parameter>
      specified by the <parameter>start</parameter> and
      <parameter>length</parameter> parameters.
-
     <para>
      If <parameter>start</parameter> is positive, the returned string
      will start at the <parameter>start</parameter>'th character of
- <parameter>string</parameter>. Examples:
- <informalexample><programlisting role=php>
+ <parameter>string</parameter>.
+ <para>
+ Examples:
+ <informalexample>
+ <programlisting role="php">
 $rest = substr("abcdef", 1); // returns "bcdef"
 $rest = substr("abcdef", 1, 3); // returns "bcd"
-</programlisting>
+ </programlisting>
      </informalexample>
-
     <para>
      If <parameter>start</parameter> is negative, the returned string
      will start at the <parameter>start</parameter>'th character
- from the end of <parameter>string</parameter>. Examples:
- <informalexample><programlisting role=php>
+ from the end of <parameter>string</parameter>.
+ <para>
+ Examples:
+ <informalexample>
+ <programlisting role="php">
 $rest = substr("abcdef", -1); // returns "f"
 $rest = substr("abcdef", -2); // returns "ef"
 $rest = substr("abcdef", -3, 1); // returns "d"
-</programlisting>
+ </programlisting>
      </informalexample>
-
     <para>
- If <parameter>length</parameter> is given and is positive,
- the string returned will end <parameter>length</parameter>
- characters from <parameter>start</parameter>. If this would
- result in a string with negative length (because the start
- is past the end of the string), then the returned string
- will contain the single character at <parameter>start</parameter>.
-
- <para>
- If <parameter>length</parameter> is given and is negative,
- the string returned will end <parameter>length</parameter>
- characters from the end of <parameter>string</parameter>. If this would
+ If <parameter>length</parameter> is given and is positive, the
+ string returned will end <parameter>length</parameter> characters
+ from <parameter>start</parameter>. If this would result in