-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PHP 8.4] fix php/doc-en#4063 (PHP 8.4: trigger_error() updates) #191
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,6 +1,6 @@ | ||||||||||||||||
<?xml version="1.0" encoding="utf-8"?> | ||||||||||||||||
<!-- $Revision$ --> | ||||||||||||||||
<!-- EN-Revision: 210d382b5b139444fe2e16a5a3211076a65ff2ba Maintainer: hirokawa Status: ready --> | ||||||||||||||||
<!-- EN-Revision: 72b70d7c3c3b2b87423641906da2db407c32c3c3 Maintainer: hirokawa Status: ready --> | ||||||||||||||||
<!-- CREDITS: takagi --> | ||||||||||||||||
<refentry xml:id="function.trigger-error" xmlns="http://docbook.org/ns/docbook"> | ||||||||||||||||
<refnamediv> | ||||||||||||||||
|
@@ -46,6 +46,14 @@ | |||||||||||||||
</varlistentry> | ||||||||||||||||
</variablelist> | ||||||||||||||||
</para> | ||||||||||||||||
<warning> | ||||||||||||||||
<simpara> | ||||||||||||||||
<parameter>error_level</parameter> として | ||||||||||||||||
<constant>E_USER_ERROR</constant> を指定するのは非推奨となりました。 | ||||||||||||||||
かわりに、<exceptionname>Exception</exceptionname> をスローするか、 | ||||||||||||||||
<function>exit</function> を呼び出してください。 | ||||||||||||||||
</simpara> | ||||||||||||||||
</warning> | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||||
</refsect1> | ||||||||||||||||
|
||||||||||||||||
<refsect1 role="returnvalues"> | ||||||||||||||||
|
@@ -77,6 +85,22 @@ | |||||||||||||||
</row> | ||||||||||||||||
</thead> | ||||||||||||||||
<tbody> | ||||||||||||||||
<row> | ||||||||||||||||
<entry>8.4.0</entry> | ||||||||||||||||
<entry> | ||||||||||||||||
<parameter>error_level</parameter> として | ||||||||||||||||
<constant>E_USER_ERROR</constant> を指定するのは非推奨となりました。 | ||||||||||||||||
かわりに、<exceptionname>Exception</exceptionname> をスローするか、 | ||||||||||||||||
<function>exit</function> を呼び出してください。 | ||||||||||||||||
</entry> | ||||||||||||||||
</row> | ||||||||||||||||
<row> | ||||||||||||||||
<entry>8.4.0</entry> | ||||||||||||||||
<entry> | ||||||||||||||||
戻り値の型が、<type>bool</type> ではなく | ||||||||||||||||
<type>true</type> に変更されました。 | ||||||||||||||||
</entry> | ||||||||||||||||
</row> | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||||
<row> | ||||||||||||||||
<entry>8.0.0</entry> | ||||||||||||||||
<entry> | ||||||||||||||||
|
@@ -102,9 +126,11 @@ | |||||||||||||||
<programlisting role="php"> | ||||||||||||||||
<![CDATA[ | ||||||||||||||||
<?php | ||||||||||||||||
if ($divisor == 0) { | ||||||||||||||||
trigger_error("ゼロで割ることはできません", E_USER_ERROR); | ||||||||||||||||
$password = $_POST['password'] ?? ''; | ||||||||||||||||
if ($password === '') { | ||||||||||||||||
trigger_error("空のパスワードを使用することは安全ではありません", E_USER_WARNING); | ||||||||||||||||
} | ||||||||||||||||
$hash = password_hash($password, PASSWORD_DEFAULT); | ||||||||||||||||
?> | ||||||||||||||||
]]> | ||||||||||||||||
</programlisting> | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||||
|
@@ -129,6 +155,7 @@ if ($divisor == 0) { | |||||||||||||||
<member><function>set_error_handler</function></member> | ||||||||||||||||
<member><function>restore_error_handler</function></member> | ||||||||||||||||
<member><link linkend="errorfunc.constants">エラーレベル定数</link></member> | ||||||||||||||||
<member><classname>Deprecated</classname> アトリビュート</member> | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 他の箇所でも「アトリビュート」「属性」の訳語が揺れていそうで、一旦「アトリビュート」にしています。 doc-ja/appendices/migration84/new-features.xml Lines 130 to 136 in c378f9b
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 ありがとうございます!私も アトリビュート が良いと思います。 普通名詞の意味の「属性」ではなく、固有シンタックスを指していることが明確にわかりますね。 |
||||||||||||||||
</simplelist> | ||||||||||||||||
</para> | ||||||||||||||||
</refsect1> | ||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
php/doc-en@72b70d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍