[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/reference/array/functions/_array-fill.xml?=
From:       Peter_Cowburn <salathe () php ! net>
Date:       2011-04-30 11:46:19
Message-ID: svn-salathe-1304163979-310656-547274020 () svn ! php ! net
[Download RAW message or body]

salathe                                  Sat, 30 Apr 2011 11:46:19 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=310656

Log:
clarify parameter descriptions for array_fill() (doc #54628)

Bug: http://bugs.php.net/54628 (Open) for array_fill, description of parameter \
start_index appears incorrect.  
Changed paths:
    U   phpdoc/en/trunk/reference/array/functions/array-fill.xml

Modified: phpdoc/en/trunk/reference/array/functions/array-fill.xml
===================================================================
--- phpdoc/en/trunk/reference/array/functions/array-fill.xml	2011-04-29 13:49:56 UTC \
                (rev 310655)
+++ phpdoc/en/trunk/reference/array/functions/array-fill.xml	2011-04-30 11:46:19 UTC \
(rev 310656) @@ -32,8 +32,14 @@
      <listitem>
       <para>
        The first index of the returned array.
-       Supports non-negative indexes only.
       </para>
+      <para>
+       If <parameter>start_index</parameter> is negative,
+       the first index of the returned array will be
+       <parameter>start_index</parameter> and the following
+       indices will start from zero
+       (see <link linkend="function.array-fill.example.basic">example</link>).
+      </para>
      </listitem>
     </varlistentry>

@@ -41,7 +47,8 @@
      <term><parameter>num</parameter></term>
      <listitem>
       <para>
-       Number of elements to insert
+       Number of elements to insert.
+       Must be greater than zero.
       </para>
      </listitem>
     </varlistentry>
@@ -77,13 +84,13 @@
  <refsect1 role="examples">
   &reftitle.examples;
   <para>
-   <example>
+   <example xml:id="function.array-fill.example.basic">
     <title><function>array_fill</function> example</title>
     <programlisting role="php">
 <![CDATA[
 <?php
 $a = array_fill(5, 6, 'banana');
-$b = array_fill(-2, 2, 'pear');
+$b = array_fill(-2, 4, 'pear');
 print_r($a);
 print_r($b);
 ?>
@@ -105,6 +112,8 @@
 (
     [-2] => pear
     [0] => pear
+    [1] => pear
+    [2] => pear
 )
 ]]>
     </screen>



-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic