svn: /phpdoc/ja/trunk/reference/array/functions/ array-key-first.xml array-key-last.xml
| From: | Yoshinari Takaoka | Date: | Thu, 02 Jan 2020 01:41:14 +0000 |
| Subject: | svn: /phpdoc/ja/trunk/reference/array/functions/ array-key-first.xml array-key-last.xml | ||
| Groups: | php.doc.ja | ||
| Request: | Send a blank email to doc-ja+get-5290@lists.php.net to get a copy of this message | ||
mumumu Thu, 02 Jan 2020 01:41:14 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=348761
Log:
added array-key-[last|first] translation
Changed paths:
A phpdoc/ja/trunk/reference/array/functions/array-key-first.xml
A phpdoc/ja/trunk/reference/array/functions/array-key-last.xml
Added: phpdoc/ja/trunk/reference/array/functions/array-key-first.xml
===================================================================
--- phpdoc/ja/trunk/reference/array/functions/array-key-first.xml (rev 0)
+++ phpdoc/ja/trunk/reference/array/functions/array-key-first.xml 2020-01-02 01:41:14 UTC (rev
348761)
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 347396 Maintainer: mumumu Status: ready -->
+
+<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>
+ <refpurpose>配列の最初のキーを得る</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>mixed</type><methodname>array_key_first</methodname>
+
<methodparam><type>array</type><parameter>array</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ 与えられた <parameter>array</parameter> の最初のキーを返します。
+ これは内部的な配列のポインタに影響を与えません。
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <variablelist>
+ <varlistentry>
+ <term><parameter>array</parameter></term>
+ <listitem>
+ <para>
+ 入力となる配列
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ 配列が空でなければ、
+ <parameter>array</parameter> の最初のキーを返します。
+ そうでなければ、&null; を返します。
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example xml:id="array_key_first.example.basic">
+ <title>基本的な <function>array_key_first</function>
関数の使い方</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$array = ['a' => 1, 'b' => 2, 'c' => 3];
+
+$firstKey = array_key_first($array);
+
+var_dump($firstKey);
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+string(1) "a"
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <tip>
+ <simpara>
+ PHP 7.3.0
より前のバージョンでは、この関数の機能を実現する方法は複数ありました。
+ <function>array_keys</function> を使うことも可能でしたが、
+ かなり非効率になる可能性があります。
+ <function>reset</function> と <function>key</function>
を使うこともできますが、
+ 配列の内部ポインタを変更する可能性があります。
+
この関数は、効率が良く、かつ内部ポインタを変更しないポリフィルとして書かれました。
+ </simpara>
+ <informalexample>
+ <programlisting role="php">
+<![CDATA[
+<?php
+if (!function_exists('array_key_first')) {
+ function array_key_first(array $arr) {
+ foreach($arr as $key => $unused) {
+ return $key;
+ }
+ return NULL;
+ }
+}
+?>
+]]>
+ </programlisting>
+ </informalexample>
+ </tip>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <simplelist>
+ <member><function>array_key_last</function></member>
+ <member><function>reset</function></member>
+ </simplelist>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Property changes on: phpdoc/ja/trunk/reference/array/functions/array-key-first.xml
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ja/trunk/reference/array/functions/array-key-last.xml
===================================================================
--- phpdoc/ja/trunk/reference/array/functions/array-key-last.xml (rev 0)
+++ phpdoc/ja/trunk/reference/array/functions/array-key-last.xml 2020-01-02 01:41:14 UTC (rev
348761)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 345342 Maintainer: mumumu Status: ready -->
+
+<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>
+ <refpurpose>配列の最後のキーを得る</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>mixed</type><methodname>array_key_last</methodname>
+
<methodparam><type>array</type><parameter>array</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ 与えられた <parameter>array</parameter> の最後のキーを返します。
+ これは内部的な配列のポインタに影響を与えません。
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <variablelist>
+ <varlistentry>
+ <term><parameter>array</parameter></term>
+ <listitem>
+ <para>
+ 入力となる配列
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ 配列が空でなければ、
+ <parameter>array</parameter> の最後のキーを返します。
+ そうでなければ、&null; を返します。
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <simplelist>
+ <member><function>array_key_first</function></member>
+ <member><function>end</function></member>
+ </simplelist>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Property changes on: phpdoc/ja/trunk/reference/array/functions/array-key-last.xml
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property