Remove default value for limit and document zero limit.

Bug #47546, #47727 and related to #47560


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@278167 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Richard Quadling 2009-04-02 09:24:07 +00:00
parent 344d78df9f
commit d71304cb7c

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.19 $ -->
<!-- $Revision: 1.20 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.explode">
<refnamediv>
<refname>explode</refname>
@ -12,7 +12,7 @@
<type>array</type><methodname>explode</methodname>
<methodparam><type>string</type><parameter>delimiter</parameter></methodparam>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>limit</parameter><initializer>-1</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>limit</parameter></methodparam>
</methodsynopsis>
<para>
Returns an array of strings, each of which is a substring of
@ -45,7 +45,7 @@
<term><parameter>limit</parameter></term>
<listitem>
<para>
If <parameter>limit</parameter> is set, the returned array will contain
If <parameter>limit</parameter> is set and positive, the returned array will contain
a maximum of <parameter>limit</parameter> elements with the last
element containing the rest of <parameter>string</parameter>.
</para>
@ -53,6 +53,9 @@
If the <parameter>limit</parameter> parameter is negative, all components
except the last -<parameter>limit</parameter> are returned.
</para>
<para>
If the <parameter>limit</parameter> parameter is zero, then this is treated as 1.
</para>
</listitem>
</varlistentry>
</variablelist>