adding various tags

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@114767 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Damien Seguy 2003-02-04 17:19:32 +00:00
parent 29fa7302fc
commit c9ae2d383c
12 changed files with 83 additions and 63 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-fill">
<refnamediv>
@ -26,10 +26,11 @@
<programlisting role="php">
<![CDATA[
$a = array_fill(5, 6, 'banana');
print_r($a);
]]>
</programlisting>
<para>
$a now has the following entries using <function>print_r</function>:
<varname>$a</varname> now is :
<screen>
<![CDATA[
Array

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.107 -->
<refentry id="function.array-flip">
<refnamediv>
@ -54,7 +54,7 @@ print_r($trans);
]]>
</programlisting>
<para>
now $trans is :
now <varname>$trans</varname> is :
<screen>
<![CDATA[
Array

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.62 -->
<refentry id="function.array-map">
<refnamediv>
@ -10,12 +10,12 @@
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>array_map</methodname>
<methodparam><type>callback</type><parameter>function</parameter></methodparam>
<methodparam><type>array</type><parameter>arr1</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>arr2...</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>array</type><methodname>array_map</methodname>
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
<methodparam><type>array</type><parameter>arr1</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

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-merge">
<refnamediv>
@ -34,10 +34,11 @@
$array1 = array ("color" => "red", 2, 4);
$array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4);
$result = array_merge ($array1, $array2);
print_r($result);
]]>
</programlisting>
<para>
The <literal>$result</literal> will be:
The <varname>$result</varname> is:
<screen role="php">
<![CDATA[
Array

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-push">
<refnamediv>
@ -39,6 +39,7 @@ $array[] = $var;
<![CDATA[
$stack = array ("orange", "banana");
array_push ($stack, "apple", "raspberry");
print_r($stack);
]]>
</programlisting>
<para>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-shift">
<refnamediv>
@ -29,6 +29,7 @@
<![CDATA[
$stack = array ("orange", "banana", "apple", "raspberry");
$fruit = array_shift ($stack);
print_r($fruit);
]]>
</programlisting>
<para>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-values">
<refnamediv>
@ -14,7 +14,8 @@
</methodsynopsis>
<para>
<function>array_values</function> returns all the values from the
<parameter>input</parameter> array.
<parameter>input</parameter> array and indexes numerically the
array.
</para>
<para>
<example>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.110 -->
<refentry id="function.array">
<refnamediv>
@ -99,9 +99,9 @@ print_r($firstquarter);
<![CDATA[
Array
(
[1] => 'January'
[2] => 'February'
[3] => 'March'
[1] => Janvier
[2] => F&eacute;vrier
[3] => Mars
)
]]>
</screen>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.each">
<refnamediv>
@ -38,33 +38,45 @@
<![CDATA[
$foo = array ("bob", "fred", "jussi", "jouni", "egon", "marliese");
$bar = each ($foo);
print_r($bar);
]]>
</programlisting>
<para>
<varname>$bar</varname> now contains the following key/value
pairs:
<itemizedlist spacing="compact">
<listitem><simpara>0 =&gt; 0</simpara></listitem>
<listitem><simpara>1 =&gt; 'bob'</simpara></listitem>
<listitem><simpara>key =&gt; 0</simpara></listitem>
<listitem><simpara>value =&gt; 'bob'</simpara></listitem>
</itemizedlist>
<screen>
<![CDATA[
Array
(
[1] => bob
[value] => bob
[0] => 0
[key] => 0
)
]]>
</screen>
<programlisting role="php">
<![CDATA[
$foo = array ("Robert" => "Bob", "Seppo" => "Sepi");
$bar = each ($foo);
print_r($bar);
]]>
</programlisting>
</para>
<para>
<varname>$bar</varname> now contains the following key/value
pairs:
<itemizedlist spacing="compact">
<listitem><simpara>0 =&gt; 'Robert'</simpara></listitem>
<listitem><simpara>1 =&gt; 'Bob'</simpara></listitem>
<listitem><simpara>key =&gt; 'Robert'</simpara></listitem>
<listitem><simpara>value =&gt; 'Bob'</simpara></listitem>
</itemizedlist>
<screen>
<![CDATA[
Array
(
[1] => Bob
[value] => Bob
[0] => Robert
[key] => Robert
)
]]>
</screen>
</para>
</example>
</para>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.extract">
<refnamediv>
@ -33,12 +33,12 @@
</note>
<note>
<para>
EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS was introduced in version 4.2.0.
<constant>EXTR_IF_EXISTS</constant> and <constant>EXTR_PREFIX_IF_EXISTS</constant> was introduced in version 4.2.0.
</para>
</note>
<note>
<para>
EXTR_REFS was introduced in version 4.3.0.
<constant>EXTR_REFS</constant> was introduced in version 4.3.0.
</para>
</note>
<para>
@ -50,7 +50,7 @@
following values:
<variablelist>
<varlistentry>
<term>EXTR_OVERWRITE</term>
<term><constant>EXTR_OVERWRITE</constant></term>
<listitem>
<simpara>
If there is a collision, overwrite the existing variable.
@ -58,7 +58,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term>EXTR_SKIP</term>
<term><constant>EXTR_SKIP</constant></term>
<listitem>
<simpara>
If there is a collision, don't overwrite the existing
@ -67,7 +67,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term>EXTR_PREFIX_SAME</term>
<term><constant>EXTR_PREFIX_SAME</constant></term>
<listitem>
<simpara>If there is a collision, prefix the variable name with
<parameter>prefix</parameter>.
@ -75,7 +75,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term>EXTR_PREFIX_ALL</term>
<term><constant>EXTR_PREFIX_ALL</constant></term>
<listitem>
<simpara>
Prefix all variable names with
@ -85,7 +85,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term>EXTR_PREFIX_INVALID</term>
<term><constant>EXTR_PREFIX_INVALID</constant></term>
<listitem>
<simpara>
Only prefix invalid/numeric variable names with
@ -95,7 +95,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term>EXTR_IF_EXISTS</term>
<term><constant>EXTR_IF_EXISTS</constant></term>
<listitem>
<simpara>
Only overwrite the variable if it already exists in the
@ -107,7 +107,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term>EXTR_PREFIX_IF_EXISTS</term>
<term><constant>EXTR_PREFIX_IF_EXISTS</constant></term>
<listitem>
<simpara>
Only create prefixed variable names if the non-prefixed version
@ -117,7 +117,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term>EXTR_REFS</term>
<term><constant>EXTR_REFS</constant></term>
<listitem>
<simpara>
Extracts variables as references. This effectively means that the
@ -133,12 +133,13 @@
</para>
<para>
If <parameter>extract_type</parameter> is not specified, it is
assumed to be EXTR_OVERWRITE.
assumed to be <constant>EXTR_OVERWRITE</constant>.
</para>
<para>
Note that <parameter>prefix</parameter> is only required if
<parameter>extract_type</parameter> is EXTR_PREFIX_SAME,
EXTR_PREFIX_ALL, EXTR_PREFIX_INVALID or EXTR_PREFIX_IF_EXISTS. If
<parameter>extract_type</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
imported into the symbol table.
</para>
@ -184,19 +185,19 @@ blue, large, sphere, medium
</para>
<para>
The <varname>$size</varname> wasn't overwritten, because we
specified EXTR_PREFIX_SAME, which resulted in
<varname>$wddx_size</varname> being created. If EXTR_SKIP was
specified <constant>EXTR_PREFIX_SAME</constant>, which resulted in
<varname>$wddx_size</varname> being created. If <constant>EXTR_SKIP</constant> was
specified, then $wddx_size wouldn't even have been created.
EXTR_OVERWRITE would have caused <varname>$size</varname> to have
value "medium", and EXTR_PREFIX_ALL would result in new variables
<constant>EXTR_OVERWRITE</constant> would have caused <varname>$size</varname> to have
value "medium", and <constant>EXTR_PREFIX_ALL</constant> would result in new variables
being named <varname>$wddx_color</varname>,
<varname>$wddx_size</varname>, and
<varname>$wddx_shape</varname>.
</para>
<para>
You must use an associative array, a numerically indexed array
will not produce results unless you use EXTR_PREFIX_ALL or
EXTR_PREFIX_INVALID.
will not produce results unless you use <constant>EXTR_PREFIX_ALL</constant> or
<constant>EXTR_PREFIX_INVALID</constant>.
</para>
<para>
See also <function>compact</function>.

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.range">
<refnamediv>
@ -9,13 +9,13 @@
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>range</methodname>
<methodparam><type>mixed</type><parameter>low</parameter></methodparam>
<methodparam><type>mixed</type><parameter>high</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>step</parameter></methodparam>
</methodsynopsis>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>range</methodname>
<methodparam><type>int</type><parameter>low</parameter></methodparam>
<methodparam><type>int</type><parameter>high</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>step</parameter></methodparam>
</methodsynopsis>
<para>
<function>range</function> returns an array of elements from
<parameter>low</parameter> to <parameter>high</parameter>,

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.usort">
<refnamediv>
@ -160,9 +160,11 @@ foreach ($a as $item) {
</para>
<para>
<screen>
<![CDATA[
b
c
d
]]>
</screen>
</para>