svn: /phpdoc/ja/trunk/ appendices/migration80/incompatible.xml reference/errorfunc/functions/set-error-handler.xml
| From: | Yoshinari Takaoka | Date: | Sat, 12 Dec 2020 18:57:55 +0000 |
| Subject: | svn: /phpdoc/ja/trunk/ appendices/migration80/incompatible.xml reference/errorfunc/functions/set-error-handler.xml | ||
| Groups: | php.doc.ja | ||
| Request: | Send a blank email to doc-ja+get-5949@lists.php.net to get a copy of this message | ||
mumumu Sat, 12 Dec 2020 18:57:55 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=352041
Log:
set_error_handler: clarify callback parameters and PHP 8.0 changes
Closes GH-276.
Changed paths:
U phpdoc/ja/trunk/appendices/migration80/incompatible.xml
U phpdoc/ja/trunk/reference/errorfunc/functions/set-error-handler.xml
Modified: phpdoc/ja/trunk/appendices/migration80/incompatible.xml
===================================================================
--- phpdoc/ja/trunk/appendices/migration80/incompatible.xml 2020-12-12 18:42:49 UTC (rev 352040)
+++ phpdoc/ja/trunk/appendices/migration80/incompatible.xml 2020-12-12 18:57:55 UTC (rev 352041)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 351500 $ -->
-<!-- EN-Revision: 352024 Maintainer: mumumu Status: ready -->
+<!-- EN-Revision: 352038 Maintainer: mumumu Status: ready -->
<sect1 xml:id="migration80.incompatible" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>下位互換性のない変更点</title>
@@ -119,7 +119,8 @@
</listitem>
<listitem>
<para>
- カスタムエラーハンドラの <parameter>errcontext</parameter>
引数は削除されました。
+ <function>set_error_handler</function>
関数で設定されるカスタムエラーハンドラには、
+ <parameter>errcontext</parameter> 引数は渡されなくなりました。
</para>
</listitem>
<listitem>
Modified: phpdoc/ja/trunk/reference/errorfunc/functions/set-error-handler.xml
===================================================================
--- phpdoc/ja/trunk/reference/errorfunc/functions/set-error-handler.xml 2020-12-12 18:42:49 UTC (rev
352040)
+++ phpdoc/ja/trunk/reference/errorfunc/functions/set-error-handler.xml 2020-12-12 18:57:55 UTC (rev
352041)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 350788 Maintainer: takagi Status: ready -->
+<!-- EN-Revision: 352038 Maintainer: takagi Status: ready -->
<!-- CREDITS: hirokawa,mumumu -->
<refentry xml:id="function.set-error-handler" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -85,7 +85,7 @@
<listitem>
<simpara>
最初のパラメータ <parameter>errno</parameter> は、発生させる
- エラーのレベルを整数で格納します。
+ エラーのレベルが整数で渡されます。
</simpara>
</listitem>
</varlistentry>
@@ -94,7 +94,7 @@
<listitem>
<simpara>
2 番目のパラメータ <parameter>errstr</parameter> は、
- エラーメッセージを文字列で格納します。
+ エラーメッセージが文字列で渡されます。
</simpara>
</listitem>
</varlistentry>
@@ -102,8 +102,8 @@
<term><parameter>errfile</parameter></term>
<listitem>
<simpara>
- 3 番目のパラメータ <parameter>errfile</parameter>
はオプションで、
- エラーが発生したファイルの名前を文字列で格納します。
+ コールバックが第3引数 <parameter>errfile</parameter>
を受け入れる場合、
+ エラーが発生したファイルの名前が文字列で渡されます。
</simpara>
</listitem>
</varlistentry>
@@ -111,8 +111,8 @@
<term><parameter>errline</parameter></term>
<listitem>
<simpara>
- 4 番目のパラメータ <parameter>errline</parameter>
はオプションで、
- エラーが発生した行番号を整数で格納します。
+ コールバックが第4引数 <parameter>errline</parameter>
を受け入れる場合、
+ エラーが発生した行番号が整数で渡されます。
</simpara>
</listitem>
</varlistentry>
@@ -120,8 +120,8 @@
<term><parameter>errcontext</parameter></term>
<listitem>
<simpara>
- 5 番目のパラメータ <parameter>errcontext</parameter>
はオプションで、
-
エラーが発生した場所のアクティブシンボルテーブルを指す配列です。
+ コールバックが第4引数 <parameter>errcontext</parameter>
を受け入れる場合、
+
エラーが発生した場所のアクティブシンボルテーブルが配列で渡されます。
つまり、エラーが発生したスコープ内でのすべての変数の内容を格納した
配列が <parameter>errcontext</parameter> だということです。
ユーザーエラーハンドラは、決してエラーコンテキストを書き換えては
@@ -129,8 +129,10 @@
</simpara>
<warning xmlns="http://docbook.org/ns/docbook">
<simpara>
- このパラメータは PHP 7.2.0 以降では
<emphasis>推奨されません</emphasis>。
- これに依存しないことを強く推奨します。
+ このパラメータは PHP 7.2.0 以降では
<emphasis>推奨されなくなり</emphasis>、
+ PHP 8.0.0 で <emphasis>削除されました</emphasis>。
+ この引数をデフォルト値以外に設定すると、
+ ハンドラが呼び出された時に "too few arguments"
エラーが発生します。
</simpara>
</warning>
</listitem>
@@ -187,6 +189,13 @@
</thead>
<tbody>
<row>
+ <entry>8.0.0</entry>
+ <entry>
+ <parameter>errcontext</parameter> 引数は削除されました。
+
よって、ユーザー定義のコールバックに渡されることはありません。
+ </entry>
+ </row>
+ <row>
<entry>7.2.0</entry>
<entry>
<parameter>errcontext</parameter> が非推奨になりました。