Normalize parameter names of array functions

Normalizing parameter names in docs first to later update arginfos from that.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@331477 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nikita Popov 2013-09-24 13:06:51 +00:00
parent c52553f522
commit 3ce14fde5c
40 changed files with 203 additions and 197 deletions

View file

@ -10,11 +10,11 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_change_key_case</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>case</parameter><initializer>CASE_LOWER</initializer></methodparam>
</methodsynopsis>
<para>
Returns an array with all keys from <parameter>input</parameter> lowercased
Returns an array with all keys from <parameter>array</parameter> lowercased
or uppercased. Numbered indices are left as is.
</para>
</refsect1>
@ -25,7 +25,7 @@
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
The array to work on
@ -51,14 +51,14 @@
&reftitle.returnvalues;
<para>
Returns an array with its keys lower or uppercased, or &false; if
<parameter>input</parameter> is not an array.
<parameter>array</parameter> is not an array.
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
Throws <constant>E_WARNING</constant> if <parameter>input</parameter> is
Throws <constant>E_WARNING</constant> if <parameter>array</parameter> is
not an array.
</para>
</refsect1>

View file

@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_chunk</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam><type>int</type><parameter>size</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>preserve_keys</parameter><initializer>false</initializer></methodparam>
</methodsynopsis>
@ -26,7 +26,7 @@
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
The array to work on

View file

@ -9,13 +9,13 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_column</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam><type>mixed</type><parameter>column_key</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>index_key</parameter><initializer>null</initializer></methodparam>
</methodsynopsis>
<para>
<function>array_column</function> returns the values from a single column of
the <parameter>input</parameter> array, identified by the
the <parameter>array</parameter>, identified by the
<parameter>column_key</parameter>. Optionally, you may provide an
<parameter>index_key</parameter> to index the values in the returned array by
the values from the <parameter>index_key</parameter> column in the input
@ -27,7 +27,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
A multi-dimensional array (record set) from which to pull a column of

View file

@ -10,12 +10,12 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_count_values</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_count_values</function> returns an array using
the values of the <parameter>input</parameter> array as keys and
their frequency in <parameter>input</parameter> as values.
the values of <parameter>array</parameter> as keys and
their frequency in <parameter>array</parameter> as values.
</para>
</refsect1>
@ -25,7 +25,7 @@
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
The array of values to count
@ -40,7 +40,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an associative array of values from <parameter>input</parameter> as
Returns an associative array of values from <parameter>array</parameter> as
keys and their count as value.
</para>
</refsect1>

View file

@ -12,7 +12,7 @@
<type>array</type><methodname>array_diff_ukey</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
<methodparam><type>callable</type><parameter>key_compare_func</parameter></methodparam>
</methodsynopsis>
<para>

View file

@ -10,16 +10,15 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_filter</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
<methodparam choice="opt"><type>callable</type><parameter>callback</parameter><initializer>""</initializer></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam choice="opt"><type>callable</type><parameter>callback</parameter></methodparam>
</methodsynopsis>
<para>
Iterates over each value in
the <parameter>input</parameter> array passing them to the
<parameter>callback</parameter> function. If the <parameter>
callback</parameter> function returns true, the current
value from <parameter>input</parameter> is returned into the
result array. Array keys are preserved.
Iterates over each value in the <parameter>array</parameter>
passing them to the <parameter>callback</parameter> function.
If the <parameter>callback</parameter> function returns true, the
current value from <parameter>array</parameter> is returned into
the result array. Array keys are preserved.
</para>
</refsect1>
@ -29,7 +28,7 @@
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
The array to iterate over
@ -45,7 +44,7 @@
</para>
<para>
If no <parameter>callback</parameter> is supplied, all entries of
<parameter>input</parameter> equal to &false; (see
<parameter>array</parameter> equal to &false; (see
<link linkend="language.types.boolean.casting">converting to
boolean</link>) will be removed.
</para>

View file

@ -9,15 +9,15 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_flip</methodname>
<methodparam><type>array</type><parameter>trans</parameter></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_flip</function> returns an <type>array</type> in flip
order, i.e. keys from <parameter>trans</parameter> become values and values
from <parameter>trans</parameter> become keys.
order, i.e. keys from <parameter>array</parameter> become values and values
from <parameter>array</parameter> become keys.
</para>
<para>
Note that the values of <parameter>trans</parameter> need to be valid
Note that the values of <parameter>array</parameter> need to be valid
keys, i.e. they need to be either <type>integer</type> or
<type>string</type>. A warning will be emitted if a value has the wrong
type, and the key/value pair in question <emphasis>will not be included
@ -34,7 +34,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>trans</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
An array of key/value pairs to be flipped.

View file

@ -12,7 +12,7 @@
<type>array</type><methodname>array_intersect_assoc</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>array_intersect_assoc</function> returns an array
@ -43,7 +43,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>array</parameter></term>
<term><parameter>...</parameter></term>
<listitem>
<para>
A variable list of arrays to compare.

View file

@ -12,7 +12,7 @@
<type>array</type><methodname>array_intersect_key</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_intersect_key</function> returns an array
@ -42,7 +42,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>array</parameter></term>
<term><parameter>...</parameter></term>
<listitem>
<para>
A variable list of arrays to compare.

View file

@ -12,7 +12,7 @@
<type>array</type><methodname>array_intersect_uassoc</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
<methodparam><type>callable</type><parameter>key_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
@ -44,7 +44,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>array</parameter></term>
<term><parameter>...</parameter></term>
<listitem>
<para>
Variable list of array arguments to compare values against.

View file

@ -42,7 +42,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>array</parameter></term>
<term><parameter>...</parameter></term>
<listitem>
<para>
Variable list of array arguments to compare keys against.

View file

@ -12,7 +12,7 @@
<type>array</type><methodname>array_intersect</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_intersect</function> returns an array
@ -43,7 +43,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>array</parameter></term>
<term><parameter>...</parameter></term>
<listitem>
<para>
A variable list of arrays to compare.

View file

@ -11,7 +11,7 @@
<methodsynopsis>
<type>bool</type><methodname>array_key_exists</methodname>
<methodparam><type>mixed</type><parameter>key</parameter></methodparam>
<methodparam><type>array</type><parameter>search</parameter></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_key_exists</function> returns &true; if the
@ -34,7 +34,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>search</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
An array with keys to check.
@ -105,8 +105,8 @@ array_key_exists('first', $search_array);
For backward compatibility reasons, <function>array_key_exists</function>
will also return &true; if <parameter>key</parameter> is a property
defined within an <type>object</type> given as
<parameter>search</parameter>. This behaviour should not be relied upon,
and care should be taken to ensure that <parameter>search</parameter> is
<parameter>array</parameter>. This behaviour should not be relied upon,
and care should be taken to ensure that <parameter>array</parameter> is
an <type>array</type>.
</para>
<para>

View file

@ -10,18 +10,18 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_keys</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>search_value</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>strict</parameter><initializer>false</initializer></methodparam>
</methodsynopsis>
<para>
<function>array_keys</function> returns the keys, numeric and
string, from the <parameter>input</parameter> array.
string, from the <parameter>array</parameter>.
</para>
<para>
If the optional <parameter>search_value</parameter> is specified,
then only the keys for that value are returned. Otherwise, all
the keys from the <parameter>input</parameter> are returned.
the keys from the <parameter>array</parameter> are returned.
</para>
</refsect1>
@ -30,7 +30,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
An array containing keys to return.
@ -60,7 +60,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an array of all the keys in <parameter>input</parameter>.
Returns an array of all the keys in <parameter>array</parameter>.
</para>
</refsect1>

View file

@ -11,12 +11,12 @@
<methodsynopsis>
<type>array</type><methodname>array_map</methodname>
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
<methodparam><type>array</type><parameter>arr1</parameter></methodparam>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_map</function> returns an array containing all
the elements of <parameter>arr1</parameter> after applying the
the elements of <parameter>array1</parameter> after applying the
<parameter>callback</parameter> function to each one.
The number of parameters that the <parameter>callback</parameter>
function accepts
@ -38,7 +38,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>arr1</parameter></term>
<term><parameter>array1</parameter></term>
<listitem>
<para>
An array to run through the <parameter>callback</parameter> function.
@ -61,7 +61,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an array containing all the elements of <parameter>arr1</parameter>
Returns an array containing all the elements of <parameter>array1</parameter>
after applying the <parameter>callback</parameter> function to each one.
</para>
</refsect1>

View file

@ -9,9 +9,9 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>array_multisort</methodname>
<methodparam><type>array</type><parameter role="reference">arr</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>arg</parameter><initializer>SORT_ASC</initializer></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>arg</parameter><initializer>SORT_REGULAR</initializer></methodparam>
<methodparam><type>array</type><parameter role="reference">array1</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>array1_sort_order</parameter><initializer>SORT_ASC</initializer></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>array1_sort_flags</parameter><initializer>SORT_REGULAR</initializer></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
@ -30,7 +30,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>arr</parameter></term>
<term><parameter>array1</parameter></term>
<listitem>
<para>
An <type>array</type> being sorted.
@ -38,21 +38,28 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>arg</parameter></term>
<term><parameter>array1_sort_order</parameter></term>
<listitem>
<para>
Optionally another <type>array</type>, or sort options for the
previous <type>array</type> argument:
The order used to sort the previous <type>array</type> argument. Either
<constant>SORT_ASC</constant> to sort ascendingly or <constant>SORT_DESC</constant>
to sort descendingly.
</para>
<para>
This argument can be swapped with <parameter>array1_sort_flags</parameter>
or omitted entirely, in which case <constant>SORT_ASC</constant> is assumed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>array1_sort_flags</parameter></term>
<listitem>
<para>
Sort options for the previous <type>array</type> argument:
</para>
<para>
Sorting type flags:
<itemizedlist>
<listitem>
<simpara><constant>SORT_ASC</constant> - sort items ascendingly.</simpara>
</listitem>
<listitem>
<simpara><constant>SORT_DESC</constant> - sort items descendingly.</simpara>
</listitem>
<listitem>
<simpara><constant>SORT_REGULAR</constant> - compare items normally
(don't change types)</simpara>
@ -86,13 +93,17 @@
</listitem>
</itemizedlist>
</para>
<para>
This argument can be swapped with <parameter>array1_sort_order</parameter>
or omitted entirely, in which case <constant>SORT_REGULAR</constant> is assumed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter></term>
<listitem>
<para>
Additional <parameter>arg</parameter>'s.
More arrays, optionally followed by sort order and flags.
</para>
</listitem>
</varlistentry>
@ -123,14 +134,14 @@
<entry>5.4.0</entry>
<entry>
The <constant>SORT_NATURAL</constant> and <constant>SORT_FLAG_CASE</constant>
were added to <parameter>arg</parameter> as possible sort flags.
were added to <parameter>array1_sort_flags</parameter> as possible sort flags.
</entry>
</row>
<row>
<entry>5.3.0</entry>
<entry>
The <constant>SORT_LOCALE_STRING</constant> was added to
<parameter>arg</parameter> as possible sort flags.
<parameter>array1_sort_flags</parameter> as possible sort flags.
</entry>
</row>
</tbody>

View file

@ -10,19 +10,19 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_pad</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
<methodparam><type>int</type><parameter>pad_size</parameter></methodparam>
<methodparam><type>mixed</type><parameter>pad_value</parameter></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam><type>int</type><parameter>size</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_pad</function> returns a copy of the
<parameter>input</parameter> padded to size specified by
<parameter>pad_size</parameter> with value
<parameter>pad_value</parameter>. If
<parameter>pad_size</parameter> is positive then the array is
<parameter>array</parameter> padded to size specified by
<parameter>size</parameter> with value
<parameter>value</parameter>. If
<parameter>size</parameter> is positive then the array is
padded on the right, if it's negative then on the left. If the
absolute value of <parameter>pad_size</parameter> is less than or
equal to the length of the <parameter>input</parameter> then no
absolute value of <parameter>size</parameter> is less than or
equal to the length of the <parameter>array</parameter> then no
padding takes place.
It is possible to add at most 1048576 elements at a time.
</para>
@ -33,7 +33,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
Initial array of values to pad.
@ -41,7 +41,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>pad_size</parameter></term>
<term><parameter>size</parameter></term>
<listitem>
<para>
New size of the array.
@ -49,11 +49,11 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>pad_value</parameter></term>
<term><parameter>value</parameter></term>
<listitem>
<para>
Value to pad if <parameter>input</parameter> is less than
<parameter>pad_size</parameter>.
Value to pad if <parameter>array</parameter> is less than
<parameter>size</parameter>.
</para>
</listitem>
</varlistentry>
@ -64,12 +64,12 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a copy of the <parameter>input</parameter> padded to size specified
by <parameter>pad_size</parameter> with value
<parameter>pad_value</parameter>. If <parameter>pad_size</parameter> is
Returns a copy of the <parameter>array</parameter> padded to size specified
by <parameter>size</parameter> with value
<parameter>value</parameter>. If <parameter>size</parameter> is
positive then the array is padded on the right, if it's negative then
on the left. If the absolute value of <parameter>pad_size</parameter> is less
than or equal to the length of the <parameter>input</parameter> then no
on the left. If the absolute value of <parameter>size</parameter> is less
than or equal to the length of the <parameter>array</parameter> then no
padding takes place.
</para>
</refsect1>

View file

@ -10,7 +10,7 @@
<methodsynopsis>
<type>int</type><methodname>array_push</methodname>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value1</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
@ -25,7 +25,7 @@ $array[] = $var;
?>
]]>
</programlisting>
repeated for each <parameter>var</parameter>.
repeated for each passed value.
</para>
<note>
<simpara>
@ -55,10 +55,10 @@ $array[] = $var;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>var</parameter></term>
<term><parameter>value1</parameter></term>
<listitem>
<para>
The pushed value.
The first value to push onto the end of the <parameter>array</parameter>.
</para>
</listitem>
</varlistentry>

View file

@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>array_rand</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>num_req</parameter><initializer>1</initializer></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>num</parameter><initializer>1</initializer></methodparam>
</methodsynopsis>
<para>
Picks one or more random entries out of an array, and returns the
@ -22,7 +22,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
The input array.
@ -30,7 +30,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>num_req</parameter></term>
<term><parameter>num</parameter></term>
<listitem>
<para>
Specifies how many entries you want to pick. Trying to pick more

View file

@ -9,14 +9,14 @@
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>array_reduce</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
<methodparam><type>callable</type><parameter>function</parameter></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>initial</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
<function>array_reduce</function> applies iteratively the
<parameter>function</parameter> function to the elements of the
array <parameter>input</parameter>, so as to reduce the array to
<parameter>callback</parameter> function to the elements of the
<parameter>array</parameter>, so as to reduce the array to
a single value.
</para>
</refsect1>
@ -25,7 +25,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
The input array.
@ -33,7 +33,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>function</parameter></term>
<term><parameter>callback</parameter></term>
<listitem>
<para>
The callback function.

View file

@ -9,13 +9,13 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_replace_recursive</methodname>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_replace_recursive</function> replaces the values of the first
<parameter>array</parameter> with the same values from all the following
<function>array_replace_recursive</function> replaces the values of
<parameter>array1</parameter> with the same values from all the following
arrays. If a key from the first array exists in the second array, its value
will be replaced by the value from the second array. If the key exists in the
second array, and not the first, it will be created in the first array.
@ -28,9 +28,9 @@
arrays and apply the same process to the inner value.
</para>
<para>
When the value in <parameter>array</parameter> is scalar, it will be replaced
by the value in <parameter>array1</parameter>, may it be scalar or array.
When the value in <parameter>array</parameter> and <parameter>array1</parameter>
When the value in <parameter>array1</parameter> is scalar, it will be replaced
by the value in <parameter>array2</parameter>, may it be scalar or array.
When the value in <parameter>array1</parameter> and <parameter>array2</parameter>
are both arrays, <function>array_replace_recursive</function> will replace
their respective value recursively.
</para>
@ -40,7 +40,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>array</parameter></term>
<term><parameter>array1</parameter></term>
<listitem>
<para>
The array in which elements are replaced.
@ -48,7 +48,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>array1</parameter></term>
<term><parameter>array2</parameter></term>
<listitem>
<para>
The array from which elements will be extracted.

View file

@ -9,13 +9,13 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_replace</methodname>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_replace</function> replaces the values of the first
<parameter>array</parameter> with the same values from all the following
<function>array_replace</function> replaces the values of
<parameter>array1</parameter> with the same values from all the following
arrays. If a key from the first array exists in the second array, its value
will be replaced by the value from the second array. If the key exists in the
second array, and not the first, it will be created in the first array.
@ -33,7 +33,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>array</parameter></term>
<term><parameter>array1</parameter></term>
<listitem>
<para>
The array in which elements are replaced.
@ -41,7 +41,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>array1</parameter></term>
<term><parameter>array2</parameter></term>
<listitem>
<para>
The array from which elements will be extracted.
@ -104,6 +104,7 @@ Array
<para>
<simplelist>
<member><function>array_replace_recursive</function></member>
<member><function>array_merge</function></member>
</simplelist>
</para>
</refsect1>

View file

@ -11,7 +11,7 @@
<type>array</type><methodname>array_splice</methodname>
<methodparam><type>array</type><parameter role="reference">input</parameter></methodparam>
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>count($input)</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>replacement</parameter><initializer>array()</initializer></methodparam>
</methodsynopsis>
<para>

View file

@ -11,8 +11,8 @@
<type>array</type><methodname>array_udiff_assoc</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam><type>callable</type><parameter>data_compare_func</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
<methodparam><type>callable</type><parameter>value_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
Computes the difference of arrays with additional index check, compares
@ -47,7 +47,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data_compare_func</parameter></term>
<term><parameter>value_compare_func</parameter></term>
<listitem>
<para>
&return.callbacksort;

View file

@ -11,8 +11,8 @@
<type>array</type><methodname>array_udiff_uassoc</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam><type>callable</type><parameter>data_compare_func</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
<methodparam><type>callable</type><parameter>value_compare_func</parameter></methodparam>
<methodparam><type>callable</type><parameter>key_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
@ -45,7 +45,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data_compare_func</parameter></term>
<term><parameter>value_compare_func</parameter></term>
<listitem>
<para>
&return.callbacksort;

View file

@ -11,8 +11,8 @@
<type>array</type><methodname>array_udiff</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam><type>callable</type><parameter>data_compare_func</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
<methodparam><type>callable</type><parameter>value_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
Computes the difference of arrays by using a callback function for data
@ -41,7 +41,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data_compare_func</parameter></term>
<term><parameter>value_compare_func</parameter></term>
<listitem>
<para>
The callback comparison function.

View file

@ -11,8 +11,8 @@
<type>array</type><methodname>array_uintersect_assoc</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam><type>callable</type><parameter>data_compare_func</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
<methodparam><type>callable</type><parameter>value_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
Computes the intersection of arrays with additional index check, compares
@ -45,7 +45,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data_compare_func</parameter></term>
<term><parameter>value_compare_func</parameter></term>
<listitem>
<para>
&return.callbacksort;

View file

@ -11,8 +11,8 @@
<type>array</type><methodname>array_uintersect_uassoc</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam><type>callable</type><parameter>data_compare_func</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
<methodparam><type>callable</type><parameter>value_compare_func</parameter></methodparam>
<methodparam><type>callable</type><parameter>key_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
@ -43,7 +43,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data_compare_func</parameter></term>
<term><parameter>value_compare_func</parameter></term>
<listitem>
<para>
&return.callbacksort;

View file

@ -11,8 +11,8 @@
<type>array</type><methodname>array_uintersect</methodname>
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
<methodparam><type>callable</type><parameter>data_compare_func</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
<methodparam><type>callable</type><parameter>value_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
Computes the intersection of arrays, compares data by a callback function.
@ -39,7 +39,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data_compare_func</parameter></term>
<term><parameter>value_compare_func</parameter></term>
<listitem>
<para>
&return.callbacksort;

View file

@ -10,7 +10,7 @@
<methodsynopsis>
<type>int</type><methodname>array_unshift</methodname>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value1</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
@ -34,10 +34,10 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>var</parameter></term>
<term><parameter>value1</parameter></term>
<listitem>
<para>
The prepended variable.
First value to prepend.
</para>
</listitem>
</varlistentry>

View file

@ -9,11 +9,11 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_values</methodname>
<methodparam><type>array</type><parameter>input</parameter></methodparam>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_values</function> returns all the values from the
<parameter>input</parameter> array and indexes the array numerically.
<parameter>array</parameter> and indexes the array numerically.
</para>
</refsect1>
<refsect1 role="parameters">
@ -21,7 +21,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
The array.

View file

@ -9,13 +9,13 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>array_walk_recursive</methodname>
<methodparam><type>array</type><parameter role="reference">input</parameter></methodparam>
<methodparam><type>callable</type><parameter>funcname</parameter></methodparam>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>userdata</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Applies the user-defined function <parameter>funcname</parameter> to each
element of the <parameter>input</parameter> array. This function will recurse
Applies the user-defined <parameter>callback</parameter> function to each
element of the <parameter>array</parameter>. This function will recurse
into deeper arrays.
</para>
</refsect1>
@ -24,7 +24,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
The input array.
@ -32,18 +32,18 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>funcname</parameter></term>
<term><parameter>callback</parameter></term>
<listitem>
<para>
Typically, <parameter>funcname</parameter> takes on two parameters.
The <parameter>input</parameter> parameter's value being the first, and
Typically, <parameter>callback</parameter> takes on two parameters.
The <parameter>array</parameter> parameter's value being the first, and
the key/index second.
</para>
<note>
<para>
If <parameter>funcname</parameter> needs to be working with the
If <parameter>callback</parameter> needs to be working with the
actual values of the array, specify the first parameter of
<parameter>funcname</parameter> as a
<parameter>callback</parameter> as a
<link linkend="language.references">reference</link>. Then,
any changes made to those elements will be made in the
original array itself.
@ -56,8 +56,8 @@
<listitem>
<para>
If the optional <parameter>userdata</parameter> parameter is supplied,
it will be passed as the third parameter to the callback
<parameter>funcname</parameter>.
it will be passed as the third parameter to the
<parameter>callback</parameter>.
</para>
</listitem>
</varlistentry>

View file

@ -10,11 +10,11 @@
<methodsynopsis>
<type>bool</type><methodname>array_walk</methodname>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
<methodparam><type>callable</type><parameter>funcname</parameter></methodparam>
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>userdata</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<simpara>
Applies the user-defined function <parameter>funcname</parameter> to each
Applies the user-defined <parameter>callback</parameter> function to each
element of the <parameter>array</parameter> array.
</simpara>
<para>
@ -36,18 +36,18 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>funcname</parameter></term>
<term><parameter>callback</parameter></term>
<listitem>
<para>
Typically, <parameter>funcname</parameter> takes on two parameters.
Typically, <parameter>callback</parameter> takes on two parameters.
The <parameter>array</parameter> parameter's value being the first, and
the key/index second.
</para>
<note>
<para>
If <parameter>funcname</parameter> needs to be working with the
If <parameter>callback</parameter> needs to be working with the
actual values of the array, specify the first parameter of
<parameter>funcname</parameter> as a
<parameter>callback</parameter> as a
<link linkend="language.references">reference</link>. Then,
any changes made to those elements will be made in the
original array itself.
@ -57,8 +57,8 @@
<para>
Many internal functions (for example <function>strtolower</function>)
will throw a warning if more than the expected number of argument
are passed in and are not usable directly as
<parameter>funcname</parameter>.
are passed in and are not usable directly as a
<parameter>callback</parameter>.
</para>
</note>
<para>
@ -75,8 +75,8 @@
<listitem>
<para>
If the optional <parameter>userdata</parameter> parameter is supplied,
it will be passed as the third parameter to the callback
<parameter>funcname</parameter>.
it will be passed as the third parameter to the
<parameter>callback</parameter>.
</para>
</listitem>
</varlistentry>
@ -92,14 +92,10 @@
<refsect1 role="errors">
&reftitle.errors;
<para>
If function <parameter>funcname</parameter> requires more parameters than
If function <parameter>callback</parameter> requires more parameters than
given to it, an error of level <link linkend="errorfunc.constants">
E_WARNING</link> will be generated each time <function>array_walk</function>
calls <parameter>funcname</parameter>. These warnings may be suppressed by
prepending the PHP error operator
<link linkend="language.operators.errorcontrol">@</link> to the
<function>array_walk</function> call, or by using
<function>error_reporting</function>.
calls <parameter>callback</parameter>.
</para>
</refsect1>
<refsect1 role="examples">

View file

@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>compact</methodname>
<methodparam><type>mixed</type><parameter>varname</parameter></methodparam>
<methodparam><type>mixed</type><parameter>varname1</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
@ -31,7 +31,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>varname</parameter></term>
<term><parameter>varname1</parameter></term>
<listitem>
<para>
<function>compact</function> takes a variable number of parameters.

View file

@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>count</methodname>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
<methodparam><type>mixed</type><parameter>array_or_countable</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer>COUNT_NORMAL</initializer></methodparam>
</methodsynopsis>
<para>
@ -34,10 +34,10 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>var</parameter></term>
<term><parameter>array_or_countable</parameter></term>
<listitem>
<para>
The array or the object.
An array or <classname>Countable</classname> object.
</para>
</listitem>
</varlistentry>
@ -66,11 +66,11 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the number of elements in <parameter>var</parameter>.
If <parameter>var</parameter> is not an array or not an object with
Returns the number of elements in <parameter>array_or_countable</parameter>.
If the parameter is not an array or not an object with
implemented <classname>Countable</classname> interface,
<literal>1</literal> will be returned.
There is one exception, if <parameter>var</parameter> is &null;,
There is one exception, if <parameter>array_or_countable</parameter> is &null;,
<literal>0</literal> will be returned.
</para>
<caution>

View file

@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>extract</methodname>
<methodparam><type>array</type><parameter role="reference">var_array</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>extract_type</parameter><initializer>EXTR_OVERWRITE</initializer></methodparam>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>EXTR_OVERWRITE</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>prefix</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
@ -27,14 +27,13 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>var_array</parameter></term>
<term><parameter>array</parameter></term>
<listitem>
<para>
An associative array. This function treats keys as variable names and
values as variable values. For each key/value pair it will create a
variable in the current symbol table, subject to
<parameter>extract_type</parameter> and
<parameter>prefix</parameter> parameters.
<parameter>flags</parameter> and <parameter>prefix</parameter> parameters.
</para>
<para>
You must use an associative array; a numerically indexed array
@ -44,11 +43,11 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>extract_type</parameter></term>
<term><parameter>flags</parameter></term>
<listitem>
<para>
The way invalid/numeric keys and collisions are treated is determined
by the <parameter>extract_type</parameter>. It can be one of the
by the extraction <parameter>flags</parameter>. It can be one of the
following values:
<variablelist>
<varlistentry>
@ -121,16 +120,16 @@
<simpara>
Extracts variables as references. This effectively means that the
values of the imported variables are still referencing the values of
the <parameter>var_array</parameter> parameter. You can use this flag
the <parameter>array</parameter> parameter. You can use this flag
on its own or combine it with any other flag by OR'ing the
<parameter>extract_type</parameter>.
<parameter>flags</parameter>.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
If <parameter>extract_type</parameter> is not specified, it is
If <parameter>flags</parameter> is not specified, it is
assumed to be <constant>EXTR_OVERWRITE</constant>.
</para>
</listitem>
@ -140,7 +139,7 @@
<listitem>
<para>
Note that <parameter>prefix</parameter> is only required if
<parameter>extract_type</parameter> is <constant>EXTR_PREFIX_SAME</constant>,
<parameter>flags</parameter> is <constant>EXTR_PREFIX_SAME</constant>,
<constant>EXTR_PREFIX_ALL</constant>, <constant>EXTR_PREFIX_INVALID</constant>
or <constant>EXTR_PREFIX_IF_EXISTS</constant>. If
the prefixed result is not a valid variable name, it is not
@ -255,7 +254,7 @@ blue, large, sphere, medium
If you do, for example if you want to run old code that relies
on <link linkend="security.globals">register_globals</link>
temporarily, make sure you use one of the non-overwriting
<parameter>extract_type</parameter> values such as
<parameter>flags</parameter> values such as
<constant>EXTR_SKIP</constant> and be aware that you should extract
in the same order that's defined in
<link linkend="ini.variables-order">variables_order</link> within the

View file

@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>list</methodname>
<methodparam><type>mixed</type><parameter>varname</parameter></methodparam>
<methodparam><type>mixed</type><parameter>var1</parameter></methodparam>
<methodparam rep="repeat" choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
@ -23,7 +23,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>varname</parameter></term>
<term><parameter>var1</parameter></term>
<listitem>
<para>
A variable.

View file

@ -11,7 +11,7 @@
<methodsynopsis>
<type>bool</type><methodname>uasort</methodname>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
<methodparam><type>callable</type><parameter>cmp_function</parameter></methodparam>
<methodparam><type>callable</type><parameter>value_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
This function sorts an array such that array indices maintain their
@ -37,7 +37,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>cmp_function</parameter></term>
<term><parameter>value_compare_func</parameter></term>
<listitem>
<para>
See <function>usort</function> and <function>uksort</function> for

View file

@ -10,7 +10,7 @@
<methodsynopsis>
<type>bool</type><methodname>uksort</methodname>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
<methodparam><type>callable</type><parameter>cmp_function</parameter></methodparam>
<methodparam><type>callable</type><parameter>key_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
<function>uksort</function> will sort the keys of an array using a
@ -32,7 +32,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>cmp_function</parameter></term>
<term><parameter>key_compare_func</parameter></term>
<listitem>
<para>
&return.callbacksort;

View file

@ -10,7 +10,7 @@
<methodsynopsis>
<type>bool</type><methodname>usort</methodname>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
<methodparam><type>callable</type><parameter>cmp_function</parameter></methodparam>
<methodparam><type>callable</type><parameter>value_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
This function will sort an array by its values using a user-supplied
@ -37,7 +37,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>cmp_function</parameter></term>
<term><parameter>value_compare_func</parameter></term>
<listitem>
<para>
&return.callbacksort;
@ -78,7 +78,7 @@
<row>
<entry>4.1.0</entry>
<entry>
A new sort algorithm was introduced. The <parameter>cmp_function</parameter>
A new sort algorithm was introduced. The <parameter>value_compare_func</parameter>
doesn't keep the original order for elements comparing as equal.
</entry>
</row>