mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Generate array methodsynopses based on stubs
Partial merge of <https://github.com/php/doc-en/pull/266>. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351860 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
fa0c88f1e3
commit
cd943f94a0
36 changed files with 131 additions and 140 deletions
|
@ -11,7 +11,7 @@
|
|||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_change_key_case</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>case</parameter><initializer>CASE_LOWER</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>case</parameter><initializer><constant>CASE_LOWER</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns an array with all keys from <parameter>array</parameter> lowercased
|
||||
|
@ -101,7 +101,6 @@ Array
|
|||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_chunk</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>size</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>preserve_keys</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Chunks an array into arrays with <parameter>size</parameter> elements.
|
||||
The last chunk may contain less than <parameter>size</parameter> elements.
|
||||
Chunks an array into arrays with <parameter>length</parameter> elements.
|
||||
The last chunk may contain less than <parameter>length</parameter> elements.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
|||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>size</parameter></term>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size of each chunk
|
||||
|
@ -61,14 +61,14 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a multidimensional numerically indexed array, starting with zero,
|
||||
with each dimension containing <parameter>size</parameter> elements.
|
||||
with each dimension containing <parameter>length</parameter> elements.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
If <parameter>size</parameter> is less than 1
|
||||
If <parameter>length</parameter> is less than 1
|
||||
<constant>E_WARNING</constant> will be thrown and &null; returned.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -146,7 +146,6 @@ Array
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_column</methodname>
|
||||
<methodparam><type>array</type><parameter>input</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>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>int</type><type>string</type><type>null</type></type><parameter>column_key</parameter></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>int</type><type>string</type><type>null</type></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>, identified by the
|
||||
the <parameter>array</parameter>, identified by the
|
||||
<parameter>column_key</parameter>. Optionally, an
|
||||
<parameter>index_key</parameter> may be provided to index the values in the
|
||||
returned array by the values from the <parameter>index_key</parameter>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>input</parameter></term>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A multi-dimensional array or an array of objects from which to pull a
|
||||
|
@ -87,7 +87,7 @@
|
|||
<row>
|
||||
<entry>7.0.0</entry>
|
||||
<entry>
|
||||
Added the ability for the <parameter>input</parameter> parameter to be
|
||||
Added the ability for the <parameter>array</parameter> parameter to be
|
||||
an array of objects.
|
||||
</entry>
|
||||
</row>
|
||||
|
@ -288,7 +288,6 @@ Array
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_fill</methodname>
|
||||
<methodparam><type>int</type><parameter>start_index</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>num</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>count</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Fills an array with
|
||||
<parameter>num</parameter> entries of the value of the
|
||||
<parameter>count</parameter> entries of the value of the
|
||||
<parameter>value</parameter> parameter, keys starting at the
|
||||
<parameter>start_index</parameter> parameter.
|
||||
</para>
|
||||
|
@ -44,7 +44,7 @@
|
|||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>num</parameter></term>
|
||||
<term><parameter>count</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of elements to insert.
|
||||
|
@ -76,7 +76,7 @@
|
|||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
Throws a <constant>E_WARNING</constant> if <parameter>num</parameter> is
|
||||
Throws a <constant>E_WARNING</constant> if <parameter>count</parameter> is
|
||||
less than zero.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -96,8 +96,8 @@
|
|||
<row>
|
||||
<entry>5.6.0</entry>
|
||||
<entry>
|
||||
<parameter>num</parameter> may now be zero. Previously,
|
||||
<parameter>num</parameter> was required to be greater than zero.
|
||||
<parameter>count</parameter> may now be zero. Previously,
|
||||
<parameter>count</parameter> was required to be greater than zero.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
@ -166,7 +166,6 @@ Array
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_filter</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>callable</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flag</parameter><initializer>0</initializer></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>callable</type><type>null</type></type><parameter>callback</parameter><initializer>&null;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Iterates over each value in the <parameter>array</parameter>
|
||||
|
@ -56,7 +56,7 @@
|
|||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>flag</parameter></term>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Flag determining what arguments are sent to <parameter>callback</parameter>:
|
||||
|
@ -98,10 +98,16 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>callback</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>5.6.0</entry>
|
||||
<entry>
|
||||
Added optional <parameter>flag</parameter> parameter and constants
|
||||
Added optional <parameter>mode</parameter> parameter and constants
|
||||
<constant>ARRAY_FILTER_USE_KEY</constant> and
|
||||
<constant>ARRAY_FILTER_USE_BOTH</constant>
|
||||
</entry>
|
||||
|
@ -203,7 +209,7 @@ Array
|
|||
</example>
|
||||
<example>
|
||||
<title><function>array_filter</function> with
|
||||
<parameter>flag</parameter></title>
|
||||
<parameter>mode</parameter></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
@ -261,7 +267,6 @@ array(2) {
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.array-key-exists">
|
||||
<refentry xml:id="function.array-key-exists" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_key_exists</refname>
|
||||
<refpurpose>Checks if the given key or index exists in the array</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>array_key_exists</methodname>
|
||||
<methodparam><type>mixed</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>string</type><type>int</type></type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -128,7 +128,6 @@ array_key_exists('first', $search_array);
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.array-key-first" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>array_key_first</refname>
|
||||
|
@ -10,7 +9,7 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>array_key_first</methodname>
|
||||
<type class="union"><type>int</type><type>string</type><type>null</type></type><methodname>array_key_first</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -105,7 +104,6 @@ if (!function_exists('array_key_first')) {
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.array-key-last" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>array_key_last</refname>
|
||||
|
@ -10,7 +9,7 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>array_key_last</methodname>
|
||||
<type class="union"><type>int</type><type>string</type><type>null</type></type><methodname>array_key_last</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -50,7 +49,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.array-map">
|
||||
<refentry xml:id="function.array-map" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_map</refname>
|
||||
<refpurpose>Applies the callback to the elements of the given arrays</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_map</methodname>
|
||||
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>callable</type><type>null</type></type><parameter>callback</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam rep="repeat"><type>array</type><parameter>arrays</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
@ -388,7 +388,6 @@ array(1) {
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.array-pad">
|
||||
<refentry xml:id="function.array-pad" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_pad</refname>
|
||||
<refpurpose>Pad array to the specified length with a value</refpurpose>
|
||||
|
@ -11,17 +11,17 @@
|
|||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_pad</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>size</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>array_pad</function> returns a copy of the
|
||||
<parameter>array</parameter> padded to size specified by
|
||||
<parameter>size</parameter> with value
|
||||
<parameter>length</parameter> with value
|
||||
<parameter>value</parameter>. If
|
||||
<parameter>size</parameter> is positive then the array is
|
||||
<parameter>length</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>size</parameter> is less than or
|
||||
absolute value of <parameter>length</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.
|
||||
|
@ -41,7 +41,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>size</parameter></term>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
New size of the array.
|
||||
|
@ -53,7 +53,7 @@
|
|||
<listitem>
|
||||
<para>
|
||||
Value to pad if <parameter>array</parameter> is less than
|
||||
<parameter>size</parameter>.
|
||||
<parameter>length</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -65,10 +65,10 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
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
|
||||
by <parameter>length</parameter> with value
|
||||
<parameter>value</parameter>. If <parameter>length</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>size</parameter> is less
|
||||
on the left. If the absolute value of <parameter>length</parameter> is less
|
||||
than or equal to the length of the <parameter>array</parameter> then no
|
||||
padding takes place.
|
||||
</para>
|
||||
|
@ -108,7 +108,6 @@ $result = array_pad($input, 2, "noop");
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>array_rand</methodname>
|
||||
<type class="union"><type>int</type><type>string</type><type>array</type></type><methodname>array_rand</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>num</parameter><initializer>1</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
|
@ -105,7 +105,6 @@ echo $input[$rand_keys[1]] . "\n";
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_replace_recursive</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>replacements</parameter></methodparam>
|
||||
<methodparam rep="repeat"><type>array</type><parameter>replacements</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>array_replace_recursive</function> replaces the values of
|
||||
|
@ -164,7 +164,6 @@ Array
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_replace</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>replacements</parameter></methodparam>
|
||||
<methodparam rep="repeat"><type>array</type><parameter>replacements</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>array_replace</function> replaces the values of
|
||||
|
@ -100,7 +100,6 @@ Array
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>array_search</methodname>
|
||||
<type class="union"><type>int</type><type>string</type><type>false</type></type><methodname>array_search</methodname>
|
||||
<methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>strict</parameter><initializer>&false;</initializer></methodparam>
|
||||
|
@ -104,7 +104,6 @@ $key = array_search('red', $array); // $key = 1;
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<type>array</type><methodname>array_slice</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>preserve_keys</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -200,7 +200,6 @@ Array
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,20 +9,20 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_splice</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">input</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter role="reference">array</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>mixed</type><parameter>replacement</parameter><initializer>array()</initializer></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>replacement</parameter><initializer>[]</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Removes the elements designated by <parameter>offset</parameter> and
|
||||
<parameter>length</parameter> from the <parameter>input</parameter> array,
|
||||
<parameter>length</parameter> from the <parameter>array</parameter> array,
|
||||
and replaces them with the elements of the
|
||||
<parameter>replacement</parameter> array, if supplied.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Numerical keys in <parameter>input</parameter> are not preserved.
|
||||
Numerical keys in <parameter>array</parameter> are not preserved.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
|
@ -39,7 +39,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>input</parameter></term>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input array.
|
||||
|
@ -52,12 +52,12 @@
|
|||
<para>
|
||||
If <parameter>offset</parameter> is positive then the start of the
|
||||
removed portion is at that offset from the beginning of the
|
||||
<parameter>input</parameter> array.
|
||||
<parameter>array</parameter> array.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>offset</parameter> is negative then the start of the
|
||||
removed portion is at that offset from the end of the
|
||||
<parameter>input</parameter> array.
|
||||
<parameter>array</parameter> array.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -124,6 +124,29 @@
|
|||
Returns an array consisting of the extracted elements.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>length</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -234,7 +257,6 @@ array_splice($input, $x, 1, $y);
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_unique</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>sort_flags</parameter><initializer>SORT_STRING</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>SORT_STRING</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Takes an input <parameter>array</parameter> and returns a new array
|
||||
|
@ -19,7 +19,7 @@
|
|||
</para>
|
||||
<para>
|
||||
Note that keys are preserved. If multiple elements compare equal under
|
||||
the given <parameter>sort_flags</parameter>, then the key and value of
|
||||
the given <parameter>flags</parameter>, then the key and value of
|
||||
the first equal element will be retained.
|
||||
</para>
|
||||
<note>
|
||||
|
@ -44,10 +44,10 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sort_flags</parameter></term>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The optional second parameter <parameter>sort_flags</parameter>
|
||||
The optional second parameter <parameter>flags</parameter>
|
||||
may be used to modify the sorting behavior using these values:
|
||||
</para>
|
||||
<para>
|
||||
|
@ -98,7 +98,7 @@
|
|||
<row>
|
||||
<entry>7.2.0</entry>
|
||||
<entry>
|
||||
If <parameter>sort_flags</parameter> is <constant>SORT_STRING</constant>,
|
||||
If <parameter>flags</parameter> is <constant>SORT_STRING</constant>,
|
||||
formerly <parameter>array</parameter> has been copied and non-unique
|
||||
elements have been removed (without packing the array afterwards), but
|
||||
now a new array is built by adding the unique elements. This can result
|
||||
|
@ -183,7 +183,6 @@ array(2) {
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<methodsynopsis>
|
||||
<type>bool</type><methodname>arsort</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>sort_flags</parameter><initializer>SORT_REGULAR</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>SORT_REGULAR</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function sorts an array such that array indices maintain their
|
||||
|
@ -35,11 +35,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sort_flags</parameter></term>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You may modify the behavior of the sort using the optional parameter
|
||||
<parameter>sort_flags</parameter>, for details see
|
||||
<parameter>flags</parameter>, for details see
|
||||
<function>sort</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -95,7 +95,6 @@ c = apple
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<methodsynopsis>
|
||||
<type>bool</type><methodname>asort</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>sort_flags</parameter><initializer>SORT_REGULAR</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>SORT_REGULAR</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function sorts an array such that array indices maintain
|
||||
|
@ -33,11 +33,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sort_flags</parameter></term>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You may modify the behavior of the sort using the optional
|
||||
parameter <parameter>sort_flags</parameter>, for details
|
||||
parameter <parameter>flags</parameter>, for details
|
||||
see <function>sort</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -93,7 +93,6 @@ a = orange
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>compact</methodname>
|
||||
<methodparam><type>mixed</type><parameter>var_name</parameter></methodparam>
|
||||
<methodparam rep="repeat"><type>mixed</type><parameter>var_names</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>var_name</parameter></methodparam>
|
||||
<methodparam rep="repeat"><type class="union"><type>array</type><type>string</type></type><parameter>var_names</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Creates an array containing variables and their values.
|
||||
|
@ -141,7 +141,6 @@ Array
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>count</methodname>
|
||||
<methodparam><type>mixed</type><parameter>array_or_countable</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer>COUNT_NORMAL</initializer></methodparam>
|
||||
<methodparam><type class="union"><type>Countable</type><type>array</type></type><parameter>value</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>COUNT_NORMAL</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Counts all elements in an array, or something in an object.
|
||||
|
@ -34,7 +34,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array_or_countable</parameter></term>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An array or <classname>Countable</classname> object.
|
||||
|
@ -66,11 +66,11 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the number of elements in <parameter>array_or_countable</parameter>.
|
||||
Returns the number of elements in <parameter>value</parameter>.
|
||||
When the parameter is neither an array nor an object with
|
||||
implemented <classname>Countable</classname> interface,
|
||||
<literal>1</literal> will be returned.
|
||||
There is one exception, if <parameter>array_or_countable</parameter> is &null;,
|
||||
There is one exception, if <parameter>value</parameter> is &null;,
|
||||
<literal>0</literal> will be returned.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -149,7 +149,7 @@ echo count($food); // output 2
|
|||
<entry>7.2.0</entry>
|
||||
<entry>
|
||||
<function>count</function> will now yield a warning on invalid countable types
|
||||
passed to the <parameter>array_or_countable</parameter> parameter.
|
||||
passed to the <parameter>value</parameter> parameter.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
@ -169,7 +169,6 @@ echo count($food); // output 2
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>current</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>array</type><type>object</type></type><parameter>array</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Every array has an internal pointer to its "current" element,
|
||||
|
@ -127,7 +127,6 @@ var_dump(current($arr)); // array(0) { }
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>end</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>array</type><type>object</type></type><parameter role="reference">array</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>end</function> advances <parameter>array</parameter>'s
|
||||
|
@ -72,7 +72,6 @@ echo end($fruits); // cranberry
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
<methodsynopsis>
|
||||
<type>int</type><methodname>extract</methodname>
|
||||
<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>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>EXTR_OVERWRITE</constant></initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>prefix</parameter><initializer>""</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Import variables from an array into the current symbol table.
|
||||
|
@ -323,7 +323,6 @@ string(1) "/"
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>key</methodname>
|
||||
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
||||
<type class="union"><type>int</type><type>string</type><type>null</type></type><methodname>key</methodname>
|
||||
<methodparam><type class="union"><type>array</type><type>object</type></type><parameter>array</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>key</function> returns the index element of the current array
|
||||
|
@ -115,7 +115,6 @@ fruit5<br />
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<methodsynopsis>
|
||||
<type>bool</type><methodname>krsort</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>sort_flags</parameter><initializer>SORT_REGULAR</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>SORT_REGULAR</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sorts an array by key in reverse order, maintaining key to data
|
||||
|
@ -30,11 +30,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sort_flags</parameter></term>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You may modify the behavior of the sort using the optional parameter
|
||||
<parameter>sort_flags</parameter>, for details see
|
||||
<parameter>flags</parameter>, for details see
|
||||
<function>sort</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -87,7 +87,6 @@ a = orange
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<methodsynopsis>
|
||||
<type>bool</type><methodname>ksort</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>sort_flags</parameter><initializer>SORT_REGULAR</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>SORT_REGULAR</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sorts an array by key, maintaining key to data correlations. This is
|
||||
|
@ -30,11 +30,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sort_flags</parameter></term>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You may modify the behavior of the sort using the optional
|
||||
parameter <parameter>sort_flags</parameter>, for details
|
||||
parameter <parameter>flags</parameter>, for details
|
||||
see <function>sort</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -86,7 +86,6 @@ d = lemon
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>next</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>array</type><type>object</type></type><parameter role="reference">array</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>next</function> behaves like
|
||||
|
@ -94,7 +94,6 @@ $mode = end($transport); // $mode = 'plane';
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>prev</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>array</type><type>object</type></type><parameter role="reference">array</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Rewind the internal array pointer.
|
||||
|
@ -87,7 +87,6 @@ $mode = end($transport); // $mode = 'plane';
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>range</methodname>
|
||||
<methodparam><type>mixed</type><parameter>start</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>end</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>string</type><type>int</type><type>float</type></type><parameter>start</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>string</type><type>int</type><type>float</type></type><parameter>end</parameter></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>int</type><type>float</type></type><parameter>step</parameter><initializer>1</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -113,7 +113,6 @@ foreach (range('c', 'a') as $letter) {
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>reset</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>array</type><type>object</type></type><parameter role="reference">array</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>reset</function> rewinds <parameter>array</parameter>'s internal
|
||||
|
@ -96,7 +96,6 @@ echo current($array) . "<br />\n"; // "step one"
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<methodsynopsis>
|
||||
<type>bool</type><methodname>rsort</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>sort_flags</parameter><initializer>SORT_REGULAR</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>SORT_REGULAR</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function sorts an array in reverse order (highest to lowest).
|
||||
|
@ -30,11 +30,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sort_flags</parameter></term>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You may modify the behavior of the sort using the optional
|
||||
parameter <parameter>sort_flags</parameter>, for details see
|
||||
parameter <parameter>flags</parameter>, for details see
|
||||
<function>sort</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -94,7 +94,6 @@ foreach ($fruits as $key => $val) {
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<methodsynopsis>
|
||||
<type>bool</type><methodname>sort</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>sort_flags</parameter><initializer>SORT_REGULAR</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>SORT_REGULAR</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function sorts an array. Elements will be arranged from
|
||||
|
@ -31,10 +31,10 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sort_flags</parameter></term>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The optional second parameter <parameter>sort_flags</parameter>
|
||||
The optional second parameter <parameter>flags</parameter>
|
||||
may be used to modify the sorting behavior using these values:
|
||||
</para>
|
||||
<para>
|
||||
|
@ -167,7 +167,7 @@ fruits[3] = orange20
|
|||
<simpara>
|
||||
Be careful when sorting arrays with mixed types values because
|
||||
<function>sort</function> can produce unexpected results,
|
||||
if <parameter>sort_flags</parameter> is <constant>SORT_REGULAR</constant>,
|
||||
if <parameter>flags</parameter> is <constant>SORT_REGULAR</constant>,
|
||||
</simpara>
|
||||
</warning>
|
||||
</refsect1>
|
||||
|
@ -182,7 +182,6 @@ fruits[3] = orange20
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -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>value_compare_func</parameter></methodparam>
|
||||
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function sorts an array such that array indices maintain their
|
||||
|
@ -38,7 +38,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value_compare_func</parameter></term>
|
||||
<term><parameter>callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
See <function>usort</function> and <function>uksort</function> for
|
||||
|
@ -124,7 +124,6 @@ Array
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -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>key_compare_func</parameter></methodparam>
|
||||
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>uksort</function> will sort the keys of an array using a
|
||||
|
@ -33,7 +33,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>key_compare_func</parameter></term>
|
||||
<term><parameter>callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&return.callbacksort;
|
||||
|
@ -97,7 +97,6 @@ John: 1
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -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>value_compare_func</parameter></methodparam>
|
||||
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function will sort an array by its values using a user-supplied
|
||||
|
@ -33,7 +33,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value_compare_func</parameter></term>
|
||||
<term><parameter>callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&return.callbacksort;
|
||||
|
@ -238,7 +238,6 @@ z, c
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
Loading…
Reference in a new issue