Skip to content

Commit 10698d1

Browse files
authored
Translate new array functions (#2270)
1 parent ae759be commit 10698d1

File tree

2 files changed

+194
-0
lines changed

2 files changed

+194
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- EN-Revision: 85c47f89f35f927d7c7ad23235c830dc4b514ddd Maintainer: Fan2Shrek Status: ready -->
3+
<!-- Reviewed: yes -->
4+
<refentry xml:id="function.array-first" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refnamediv>
6+
<refname>array_first</refname>
7+
<refpurpose>Renvoie la première valeur d'un tableau</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<methodsynopsis>
13+
<type>mixed</type><methodname>array_first</methodname>
14+
<methodparam><type>array</type><parameter>array</parameter></methodparam>
15+
</methodsynopsis>
16+
<para>
17+
Renvoie la première valeur du <parameter>array</parameter> donné.
18+
</para>
19+
</refsect1>
20+
21+
<refsect1 role="parameters">
22+
&reftitle.parameters;
23+
<variablelist>
24+
<varlistentry>
25+
<term><parameter>array</parameter></term>
26+
<listitem>
27+
<para>
28+
Un tableau.
29+
</para>
30+
</listitem>
31+
</varlistentry>
32+
</variablelist>
33+
</refsect1>
34+
35+
<refsect1 role="returnvalues">
36+
&reftitle.returnvalues;
37+
<para>
38+
Renvoie la première valeur du <parameter>array</parameter> donné si le tableau n'est pas vide;
39+
sinon &null;.
40+
</para>
41+
</refsect1>
42+
43+
<refsect1 role="examples">
44+
&reftitle.examples;
45+
<para>
46+
<example xml:id="array_first.example.basic">
47+
<title>Utilisation basique de <function>array_first</function></title>
48+
<programlisting role="php">
49+
<![CDATA[
50+
<?php
51+
$array = [1 => 'a', 0 => 'b', 3 => 'c', 2 => 'd'];
52+
53+
$firstValue = array_first($array);
54+
55+
var_dump($firstValue);
56+
?>
57+
]]>
58+
</programlisting>
59+
&example.outputs;
60+
<screen>
61+
<![CDATA[
62+
string(1) "a"
63+
]]>
64+
</screen>
65+
</example>
66+
</para>
67+
</refsect1>
68+
69+
<refsect1 role="seealso">
70+
&reftitle.seealso;
71+
<simplelist>
72+
<member><function>array_key_first</function></member>
73+
<member><function>array_last</function></member>
74+
</simplelist>
75+
</refsect1>
76+
77+
</refentry>
78+
<!-- Keep this comment at the end of the file
79+
Local variables:
80+
mode: sgml
81+
sgml-omittag:t
82+
sgml-shorttag:t
83+
sgml-minimize-attributes:nil
84+
sgml-always-quote-attributes:t
85+
sgml-indent-step:1
86+
sgml-indent-data:t
87+
indent-tabs-mode:nil
88+
sgml-parent-document:nil
89+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
90+
sgml-exposed-tags:nil
91+
sgml-local-catalogs:nil
92+
sgml-local-ecat-files:nil
93+
End:
94+
vim600: syn=xml fen fdm=syntax fdl=2 si
95+
vim: et tw=78 syn=sgml
96+
vi: ts=1 sw=1
97+
-->
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- EN-Revision: 85c47f89f35f927d7c7ad23235c830dc4b514ddd Maintainer: Fan2Shrek Status: ready -->
3+
<!-- Reviewed: yes -->
4+
<refentry xml:id="function.array-last" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refnamediv>
6+
<refname>array_last</refname>
7+
<refpurpose>Renvoie la dernière valeur d'un tableau</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<methodsynopsis>
13+
<type>mixed</type><methodname>array_last</methodname>
14+
<methodparam><type>array</type><parameter>array</parameter></methodparam>
15+
</methodsynopsis>
16+
<para>
17+
Renvoie la dernière valeur du <parameter>array</parameter> donné.
18+
</para>
19+
</refsect1>
20+
21+
<refsect1 role="parameters">
22+
&reftitle.parameters;
23+
<variablelist>
24+
<varlistentry>
25+
<term><parameter>array</parameter></term>
26+
<listitem>
27+
<para>
28+
Un tableau.
29+
</para>
30+
</listitem>
31+
</varlistentry>
32+
</variablelist>
33+
</refsect1>
34+
35+
<refsect1 role="returnvalues">
36+
&reftitle.returnvalues;
37+
<para>
38+
Renvoie la dernière valeur du <parameter>array</parameter> donné si le tableau n'est pas vide;
39+
sinon &null;.
40+
</para>
41+
</refsect1>
42+
43+
<refsect1 role="examples">
44+
&reftitle.examples;
45+
<para>
46+
<example xml:id="array_last.example.basic">
47+
<title>Utilisation basique de <function>array_last</function></title>
48+
<programlisting role="php">
49+
<![CDATA[
50+
<?php
51+
$array = [1 => 'a', 0 => 'b', 3 => 'c', 2 => 'd'];
52+
53+
$lastValue = array_last($array);
54+
55+
var_dump($lastValue);
56+
?>
57+
]]>
58+
</programlisting>
59+
&example.outputs;
60+
<screen>
61+
<![CDATA[
62+
string(1) "d"
63+
]]>
64+
</screen>
65+
</example>
66+
</para>
67+
</refsect1>
68+
69+
<refsect1 role="seealso">
70+
&reftitle.seealso;
71+
<simplelist>
72+
<member><function>array_key_last</function></member>
73+
<member><function>array_first</function></member>
74+
</simplelist>
75+
</refsect1>
76+
77+
</refentry>
78+
<!-- Keep this comment at the end of the file
79+
Local variables:
80+
mode: sgml
81+
sgml-omittag:t
82+
sgml-shorttag:t
83+
sgml-minimize-attributes:nil
84+
sgml-always-quote-attributes:t
85+
sgml-indent-step:1
86+
sgml-indent-data:t
87+
indent-tabs-mode:nil
88+
sgml-parent-document:nil
89+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
90+
sgml-exposed-tags:nil
91+
sgml-local-catalogs:nil
92+
sgml-local-ecat-files:nil
93+
End:
94+
vim600: syn=xml fen fdm=syntax fdl=2 si
95+
vim: et tw=78 syn=sgml
96+
vi: ts=1 sw=1
97+
-->

0 commit comments

Comments
 (0)