cvs: /phpdoc/functions array.sgml pcre.sgml
| From: | Andrei Zmievski | Date: | Fri, 01 Oct 1999 19:04:09 +0000 |
| Subject: | cvs: /phpdoc/functions array.sgml pcre.sgml | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11420@lists.php.net to get a copy of this message | ||
andrei Fri Oct 1 15:04:09 1999 EDT
Modified files:
/phpdoc/functions array.sgml pcre.sgml
Log:
-new parameter to preg_split
-new function: array_reverse()
Index: phpdoc/functions/array.sgml
diff -u phpdoc/functions/array.sgml:1.24 phpdoc/functions/array.sgml:1.25
--- phpdoc/functions/array.sgml:1.24 Tue Sep 21 10:41:01 1999
+++ phpdoc/functions/array.sgml Fri Oct 1 15:04:08 1999
@@ -269,6 +269,38 @@
</refsect1>
</refentry>
+ <refentry id="function.array-reverse">
+ <refnamediv>
+ <refname>array_reverse</refname>
+ <refpurpose>Return an array with elements in reverse order</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcdef>array <function>array_reverse</function></funcdef>
+ <paramdef>array <parameter>array</parameter></paramdef>
+ </funcsynopsis>
+
+ <para>
+ <function>array_reverse</function> takes input
<parameter>array</parameter> and returns a new array with the order of the elements
reversed.
+
+ <para>
+ <example>
+ <title><function>array_reverse</function> example</title>
+ <programlisting>
+$input = array("php", 4.0, array("green", "red"));
+$result = array_reverse($input);
+ </programlisting>
+ </example>
+ This makes $result have array(array("green", "red"), 4.0,
"php").
+
+ <note>
+ <para>
+ This function was added in PHP 4.0 Beta 3.
+ </note>
+ </refsect1>
+ </refentry>
+
<refentry id="function.array-shift">
<refnamediv>
<refname>array_shift</refname>
Index: phpdoc/functions/pcre.sgml
diff -u phpdoc/functions/pcre.sgml:1.8 phpdoc/functions/pcre.sgml:1.9
--- phpdoc/functions/pcre.sgml:1.8 Thu Jul 22 09:53:17 1999
+++ phpdoc/functions/pcre.sgml Fri Oct 1 15:04:08 1999
@@ -304,14 +304,26 @@
<paramdef>string <parameter>pattern</parameter></paramdef>
<paramdef>string <parameter>subject</parameter></paramdef>
<paramdef>int
<parameter><optional>limit</optional></parameter></paramdef>
+ <paramdef>int
<parameter><optional>flags</optional></parameter></paramdef>
</funcsynopsis>
+
+ <note>
+ <para>
+ Parameter <parameter>flags</parameter> was added in PHP Beta 3.
+ </note>
+
<para>
- Returns an array containing substrings of <parameter>subject</parameter>
- split along boundaries matched by <parameter>pattern</parameter>.
+ Returns an array containing substrings of
+ <parameter>subject</parameter> split along boundaries matched by
+ <parameter>pattern</parameter>.
<para>
If <parameter>limit</parameter> is specified, then only substrings
up to <parameter>limit</parameter> are returned.
+
+ <para>
+ If flags is PREG_SPLIT_NO_EMPTY then only non-empty pieces will
+ be by <function>preg_split</function>.
<para>
<example>