com doc/ja: Fix #75787: Array iterator functions misleading: reference/array/functions/array-key-exists.xml reference/array/functions/each.xml
| From: | Yoshinari Takaoka | Date: | Sat, 13 Feb 2021 09:15:08 +0000 |
| Subject: | com doc/ja: Fix #75787: Array iterator functions misleading: reference/array/functions/array-key-exists.xml reference/array/functions/each.xml | ||
| Groups: | php.doc.ja | ||
| Request: | Send a blank email to doc-ja+get-6168@lists.php.net to get a copy of this message | ||
Commit: 960ce1d898bf34353d0d1e6c7c84ca75bbfed86b
Author: Yoshinari Takaoka <mumumu@mumumu.org> Sat, 13 Feb 2021 18:15:08 +0900
Parents: b3ef2c18bac3cea8e6d0493723e54f7e2a92ab11
Branches: master
Link: http://git.php.net/?p=doc/ja.git;a=commitdiff;h=960ce1d898bf34353d0d1e6c7c84ca75bbfed86b
Log:
Fix #75787: Array iterator functions misleading
Bugs:
https://bugs.php.net/75787
Changed paths:
M reference/array/functions/array-key-exists.xml
M reference/array/functions/each.xml
Diff:
diff --git a/reference/array/functions/array-key-exists.xml
b/reference/array/functions/array-key-exists.xml
index 97050db6ef..279349fe7f 100644
--- a/reference/array/functions/array-key-exists.xml
+++ b/reference/array/functions/array-key-exists.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: cd943f94a013b74df8765ab8e1a620a916a64a85 Maintainer: hirokawa Status: ready
-->
-<!-- CREDITS: shimooka -->
+<!-- EN-Revision: a6655e3f9508eee6860b02f55e33560a790f42d1 Maintainer: hirokawa Status: ready
-->
+<!-- CREDITS: shimooka,mumumu -->
<refentry xml:id="function.array-key-exists" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>array_key_exists</refname>
@@ -106,8 +106,7 @@ array_key_exists('first', $search_array);
過去との互換性を保つため、<parameter>key</parameter>
が仮に <parameter>array</parameter>
で指定したオブジェクトのプロパティであっても
<function>array_key_exists</function> は &true; を返します。
- しかし、この挙動に頼ってはいけません。
- <parameter>array</parameter>
にはオブジェクトではなく配列を渡すようにしましょう。
+ この挙動は PHP 7.4.0 で非推奨となり、PHP 8.0.0
以降で削除されています。
</para>
<para>
オブジェクトのプロパティが存在するかどうかを調べるには、
diff --git a/reference/array/functions/each.xml b/reference/array/functions/each.xml
index 8df79d165a..2afbe7631f 100644
--- a/reference/array/functions/each.xml
+++ b/reference/array/functions/each.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 755faca201b5ba15e23735f21ed056b47d954398 Maintainer: hirokawa Status: ready
-->
-<!-- CREDITS: shimooka -->
+<!-- EN-Revision: a6655e3f9508eee6860b02f55e33560a790f42d1 Maintainer: hirokawa Status: ready
-->
+<!-- CREDITS: shimooka,mumumu -->
<refentry xml:id="function.each" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>each</refname>
@@ -16,7 +16,7 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>each</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>
配列から現在のキーと値のペアを返して、カーソルを進めます。