From f90eae8593c8bd23fae3ef8c184ecf8ed9dc443f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Mon, 1 Jun 2026 22:39:00 +0900 Subject: [PATCH] =?UTF-8?q?doc-en=20=E3=81=A8=E5=90=8C=E6=9C=9F=E3=81=97?= =?UTF-8?q?=2011=20=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC=E3=83=AB=E3=82=92?= =?UTF-8?q?=E5=AE=8C=E8=A8=B3=EF=BC=88=E6=97=A2=E8=A8=B3=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=2015=20=E4=BB=B6=E3=83=BB=E6=96=B0=E8=A6=8F=E7=BF=BB=E8=A8=B3?= =?UTF-8?q?=202=20=E4=BB=B6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 翻訳内容 ### sscanf/fscanf 系(3件)— 負の戻り値 -1 の明確化 - reference/strings/functions/sscanf.xml 1. php/doc-en@9947012 - reference/spl/splfileobject/fscanf.xml 1. php/doc-en@9947012 - reference/filesystem/functions/fscanf.xml 1. php/doc-en@9947012 ### IMAGETYPE_HEIF 定数追加(4件・PHP 8.5) - appendices/migration85/constants.xml 1. php/doc-en@f8bab1d - reference/image/constants.xml 1. php/doc-en@f8bab1d - reference/image/functions/image-type-to-mime-type.xml 1. php/doc-en@f8bab1d - reference/exif/functions/exif-imagetype.xml 1. php/doc-en@f8bab1d ### exit 終了コード挙動(2件・PHP 8.4.0) - reference/misc/functions/exit.xml 1. php/doc-en@2312f82 - reference/funchand/functions/register-shutdown-function.xml 1. php/doc-en@2312f82 ### reference/soap(2件・新規翻訳)— PHP 8.4 resource→Object 変換 - reference/soap/soap.sdl.xml 1. php/doc-en@89205c8 - reference/soap/soap.url.xml 1. php/doc-en@89205c8 ### 独立ファイル(6件) - reference/image/functions/imagecopyresampled.xml — 戻り値型の 8.5.0 changelog を追加 1. php/doc-en@16b6c34 - reference/url/functions/http-build-query.xml — オブジェクトと __toString() の挙動を明確化 1. php/doc-en@f72c603 - reference/exec/functions/proc-close.xml — proc_get_status との終了ステータスの関係を明確化 1. php/doc-en@ef623cc - reference/hash/functions/hash.xml — changelog に E_WARNING を追記 1. php/doc-en@df2a77a - reference/stream/streamwrapper/stream-lock.xml — LOCK_NB を単独モードとして記述 1. php/doc-en@38231ac - reference/memcached/memcached/construct.xml — __construct() のパラメータ説明を補完 1. php/doc-en@c49d175 ### 完訳になったモジュール(11) filesystem / image / exif / soap / url / exec / hash / stream / memcached / misc / funchand --- appendices/migration85/constants.xml | 5 +- reference/exec/functions/proc-close.xml | 26 +++- reference/exif/functions/exif-imagetype.xml | 12 +- reference/filesystem/functions/fscanf.xml | 106 ++++++++-------- .../functions/register-shutdown-function.xml | 11 +- reference/hash/functions/hash.xml | 18 ++- reference/image/constants.xml | 14 ++- .../functions/image-type-to-mime-type.xml | 6 +- .../image/functions/imagecopyresampled.xml | 8 +- reference/memcached/memcached/construct.xml | 19 ++- reference/misc/functions/exit.xml | 12 +- reference/soap/soap.sdl.xml | 59 +++++++++ reference/soap/soap.url.xml | 59 +++++++++ reference/spl/splfileobject/fscanf.xml | 84 +++++++------ .../stream/streamwrapper/stream-lock.xml | 27 ++-- reference/strings/functions/sscanf.xml | 119 +++++++++--------- reference/url/functions/http-build-query.xml | 48 ++++++- 17 files changed, 444 insertions(+), 189 deletions(-) create mode 100644 reference/soap/soap.sdl.xml create mode 100644 reference/soap/soap.url.xml diff --git a/appendices/migration85/constants.xml b/appendices/migration85/constants.xml index 38229cb4bf..f7ce68831d 100644 --- a/appendices/migration85/constants.xml +++ b/appendices/migration85/constants.xml @@ -1,6 +1,6 @@ - + 新しいグローバル定数 @@ -162,6 +162,9 @@ Standard + + IMAGETYPE_HEIF + IMAGETYPE_SVG when libxml is loaded. diff --git a/reference/exec/functions/proc-close.xml b/reference/exec/functions/proc-close.xml index f9ca1ff200..bd9f5a07e1 100644 --- a/reference/exec/functions/proc-close.xml +++ b/reference/exec/functions/proc-close.xml @@ -1,6 +1,6 @@ - + @@ -51,7 +51,29 @@ ¬e.sigchild; - + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.3.0 + + 先に proc_get_status が呼び出された後でも、 + proc_close は正しい終了コードを返すようになりました。 + これより前のバージョンでは、-1 を返していました。 + + + + + + - + @@ -137,6 +137,10 @@ 19 IMAGETYPE_AVIF + + 20 + IMAGETYPE_HEIF + @@ -175,6 +179,12 @@ AVIF をサポートしました。 + + 8.5.0 + + HEIF をサポートしました。 + + diff --git a/reference/filesystem/functions/fscanf.xml b/reference/filesystem/functions/fscanf.xml index 2268e09bc6..db8dc17e90 100644 --- a/reference/filesystem/functions/fscanf.xml +++ b/reference/filesystem/functions/fscanf.xml @@ -1,6 +1,6 @@ - + @@ -16,66 +16,69 @@ stringformat mixedvars - + 関数fscanfsscanf に似ていますが、stream が指すファイルから入力を取得し、 指定したフォーマット format に基づき解釈を行います。 - - + + フォーマット文字列におけるあらゆる空白は 入力ストリームのあらゆる空白にマッチします。 これはつまりフォーマット文字列のタブ (\t) すらも 入力ストリームの空白1個にマッチしてしまうことを意味します。 - - + + fscanf をコールするたびに、ファイルから 1 行ずつ読み込みます。 - + &reftitle.parameters; - - - - stream - - &fs.file.pointer; - - - &strings.scanf.parameter.format; - - vars - - - オプションで代入する値。 - - - - - + + + stream + + &fs.file.pointer; + + + &strings.scanf.parameter.format; + + vars + + + オプションで代入する値。 + + + + &reftitle.returnvalues; - + この関数のパラメータが二つだけの場合、処理された値は配列として返されます。 他方、オプションのパラメータが指定された場合、 この関数は、代入された値の数を返します。 オプション引数は参照渡しとする必要があります。 - - + + string で利用可能な部分文字列よりも、 format で期待された部分文字列の数が多い場合は、&null; が返されます。 その他のエラーが発生した場合は、&false; が返されます。 - + + + オプションのパラメータを使用していて、 + いずれかの値がパースされる前に + stream から読み込んだ入力の終端に達した場合は、 + -1 が返されます。 + &reftitle.examples; - - - <function>fscanf</function> の例 - + + <function>fscanf</function> の例 + ]]> - - - - - - users.txt の内容 - + + + + users.txt の内容 + - - - + + &reftitle.seealso; - - - fread - fgets - fgetss - sscanf - printf - sprintf - - + + fread + fgets + fgetss + sscanf + printf + sprintf + diff --git a/reference/funchand/functions/register-shutdown-function.xml b/reference/funchand/functions/register-shutdown-function.xml index 319efe95a9..e52fbfd2e3 100644 --- a/reference/funchand/functions/register-shutdown-function.xml +++ b/reference/funchand/functions/register-shutdown-function.xml @@ -1,6 +1,6 @@ - + @@ -25,6 +25,15 @@ 登録した関数内で exit をコールした場合、 処理はそこで終了してその他のシャットダウン関数はコールされません。 + + + PHP 8.4.0 以降は、登録したシャットダウン関数内で引数なしの + exit をコールすると、終了コードが + 0 にリセットされます。 + 明示的にステータスを指定して exit をコールした場合は、 + すべてのバージョンで、それ以前の終了コードが上書きされます。 + + シャットダウン関数は、 別のシャットダウン関数をキューの最後に追加するために、 diff --git a/reference/hash/functions/hash.xml b/reference/hash/functions/hash.xml index 6fc0be4bc7..10167ccdfa 100644 --- a/reference/hash/functions/hash.xml +++ b/reference/hash/functions/hash.xml @@ -1,6 +1,6 @@ - + @@ -71,7 +71,15 @@ そのままのバイナリ形式で返されます。 - + + + &reftitle.errors; + + algo が不明な場合、 + ValueError がスローされます。 + + + &reftitle.changelog; @@ -90,10 +98,10 @@ 8.0.0 - hash は、 algo が未知の場合に、 - ValueError をスローするようになりました。 - これより前のバージョンでは、&false; を返していました。 + ValueError をスローするようになりました。 + これより前のバージョンでは、&false; を返し、 + E_WARNING メッセージを発行していました。 diff --git a/reference/image/constants.xml b/reference/image/constants.xml index 55f186bc6a..3f27d14987 100755 --- a/reference/image/constants.xml +++ b/reference/image/constants.xml @@ -1,6 +1,6 @@ - + &reftitle.constants; @@ -703,6 +703,18 @@ + + + IMAGETYPE_HEIF + (int) + + + &gd.constants.type; + + (PHP 8.5.0 以降で利用可能です) + + + IMAGETYPE_UNKNOWN diff --git a/reference/image/functions/image-type-to-mime-type.xml b/reference/image/functions/image-type-to-mime-type.xml index 4d1aad80ed..47ee8ae78d 100644 --- a/reference/image/functions/image-type-to-mime-type.xml +++ b/reference/image/functions/image-type-to-mime-type.xml @@ -1,6 +1,6 @@ - + @@ -130,6 +130,10 @@ IMAGETYPE_AVIF image/avif + + IMAGETYPE_HEIF + image/heif + diff --git a/reference/image/functions/imagecopyresampled.xml b/reference/image/functions/imagecopyresampled.xml index 306332a672..2ae2206f1a 100644 --- a/reference/image/functions/imagecopyresampled.xml +++ b/reference/image/functions/imagecopyresampled.xml @@ -1,6 +1,6 @@ - + @@ -143,6 +143,12 @@ + + 8.5.0 + + 戻り値の型が、&true; になりました。これより前のバージョンでは、bool でした。 + + 8.0.0 diff --git a/reference/memcached/memcached/construct.xml b/reference/memcached/memcached/construct.xml index c343a6e7f3..fd7790da61 100644 --- a/reference/memcached/memcached/construct.xml +++ b/reference/memcached/memcached/construct.xml @@ -1,6 +1,6 @@ - + Memcached::__construct @@ -39,16 +39,25 @@ callback - - - + + voidcallback + Memcachedmemcached + stringnullpersistent_id + + + callback パラメータは、接続が確立されたときに呼ばれます。 + これは、有効な PHP の callable でなければならず、 + 一番目のパラメータとして Memcached オブジェクトを、 + 二番目のパラメータとして persistent_id を受け取ります。 + connection_str - + このパラメータは、クラスタ内でのサーバーの重みなど、 + memcache サーバーへの追加の接続オプションを渡すために使います。 diff --git a/reference/misc/functions/exit.xml b/reference/misc/functions/exit.xml index 5991b3af30..b75fa96b65 100644 --- a/reference/misc/functions/exit.xml +++ b/reference/misc/functions/exit.xml @@ -1,6 +1,6 @@ - + @@ -108,6 +108,16 @@ によって呼び出すこともできるようになりました。 + + 8.4.0 + + シャットダウン関数 + や オブジェクトのデストラクタ + の中で引数なしの exit をコールすると、 + 終了コードが 0 にリセットされるようになりました。 + これより前は、それ以前の exit のコールで設定された終了コードが保持されていました。 + + diff --git a/reference/soap/soap.sdl.xml b/reference/soap/soap.sdl.xml new file mode 100644 index 0000000000..54af964fd2 --- /dev/null +++ b/reference/soap/soap.sdl.xml @@ -0,0 +1,59 @@ + + + + + Soap\Sdl クラス + Soap\Sdl + + + + +
+ &reftitle.intro; + + PHP 8.4.0 以降、soap_sdl &resource; を置き換える完全不透明クラスです。 + +
+ + +
+ &reftitle.classsynopsis; + + + + Soap + + + + final + Sdl + + + + + +
+ +
+ +
+ \ No newline at end of file diff --git a/reference/soap/soap.url.xml b/reference/soap/soap.url.xml new file mode 100644 index 0000000000..68abd02425 --- /dev/null +++ b/reference/soap/soap.url.xml @@ -0,0 +1,59 @@ + + + + + Soap\Url クラス + Soap\Url + + + + +
+ &reftitle.intro; + + PHP 8.4.0 以降、soap_url &resource; を置き換える完全不透明クラスです。 + +
+ + +
+ &reftitle.classsynopsis; + + + + Soap + + + + final + Url + + + + + +
+ +
+ +
+ diff --git a/reference/spl/splfileobject/fscanf.xml b/reference/spl/splfileobject/fscanf.xml index 9aef472035..911f9e2b8b 100644 --- a/reference/spl/splfileobject/fscanf.xml +++ b/reference/spl/splfileobject/fscanf.xml @@ -1,6 +1,6 @@ - + SplFileObject::fscanf @@ -14,77 +14,81 @@ stringformat mixedvars - + ファイルから 1 行読み込み、format に従って解釈します。 - - + + format 文字列のホワイトスペースはファイルからの行のホワイトスペースとマッチします。このことが意味するのはフォーマット文字列のタブ (\t) でさえも入力ストリームの 1 つのスペース文字とマッチしてしまうということです。 - +
&reftitle.parameters; - - - &strings.scanf.parameter.format; - - vars - - - オプションの割り当て値。 - - - - - + + &strings.scanf.parameter.format; + + vars + + + オプションの割り当て値。 + + + + &reftitle.returnvalues; - + このメソッドに渡される引数がひとつしかない場合、処理される値は配列として返されます。そうでなければ、オプションパラメータが渡される場合、メソッドは割り当て値の個数を返します。オプションパラメータは参照渡しでなければなりません。 - + + + format で期待する部分文字列のほうが + ファイルから読み込んだ行に存在するものより多い場合は + &null; を返します。 + + + オプションのパラメータを使用していて、 + いずれかの値がパースされる前にファイルから読み込んだ行の + 終端に達した場合は、-1 を返します。 + &reftitle.examples; - - - <methodname>SplFileObject::fscanf</methodname> の例 - + + <methodname>SplFileObject::fscanf</methodname> の例 + fscanf("%s %s %s")) { - list ($name, $profession, $countrycode) = $userinfo; - // $name $profession $countrycode で何かを行う + list ($name, $profession, $countrycode) = $userinfo; + // $name $profession $countrycode で何かを行う } ?> ]]> - - users.txt の内容 - + + users.txt の内容 + - - - + + &reftitle.seealso; - - - fscanf - sscanf - printf - sprintf - - + + fscanf + sscanf + printf + sprintf +
diff --git a/reference/stream/streamwrapper/stream-lock.xml b/reference/stream/streamwrapper/stream-lock.xml index 720b6a8efd..a617304808 100644 --- a/reference/stream/streamwrapper/stream-lock.xml +++ b/reference/stream/streamwrapper/stream-lock.xml @@ -1,6 +1,6 @@ - + @@ -14,13 +14,13 @@ public boolstreamWrapper::stream_lock intoperation - + このメソッドは、flock に対応してコールされます。また file_put_contents (flagsLOCK_EX を含む場合)、 stream_set_blocking がコールされたときやストリームを閉じるとき (LOCK_UN) にもコールされます。 - + @@ -48,15 +48,14 @@ LOCK_UN ロック (共有あるいは排他) を開放します。 - - - LOCK_NB - flock によるロック中にブロックしない - (Windows ではサポートしていません)。 - - + + 上記の操作のいずれかに、ビットマスクとして + LOCK_NB を追加することもできます。 + ロック取得の試行中にブロックさせたくない場合に使います + (Windows ではサポートしていません)。 + @@ -65,16 +64,16 @@ &reftitle.returnvalues; - + &return.success; - + &reftitle.errors; - + このメソッドのコールに失敗した場合 (実装されていないなど) は E_WARNING を発行します。 - + diff --git a/reference/strings/functions/sscanf.xml b/reference/strings/functions/sscanf.xml index 72da1f3e20..aaff057f3d 100644 --- a/reference/strings/functions/sscanf.xml +++ b/reference/strings/functions/sscanf.xml @@ -1,6 +1,6 @@ - + @@ -16,67 +16,69 @@ stringformat mixedvars - + 関数 sscanf は、printf の入力版です。sscanf は、文字列 string を読み込み、これを指定したフォーマット format に基づき解釈します。 - - + + フォーマット文字列の中のあらゆる空白文字は、入力文字列の中の 空白文字列にマッチします。つまり、フォーマット文字列の中にタブ文字 (\t) が含まれていても、 それは入力中の半角スペースにマッチしてしまうということです。 - + &reftitle.parameters; - - - - string - - - 入力文字列。 - - - - &strings.scanf.parameter.format; - - vars - - - オプションで指定する参照渡しの変数に、 - パースされた値が格納されます。 - - - - - + + + string + + + 入力文字列。 + + + + &strings.scanf.parameter.format; + + vars + + + オプションで指定する参照渡しの変数に、 + パースされた値が格納されます。 + + + + &reftitle.returnvalues; - - この関数のパラメータが二つだけの場合、処理された値は配列として返されます。 + + この関数のパラメータが二つだけの場合、処理された値は array として返されます。 それ以外の場合は、もしオプションのパラメータが渡されればこの関数は 割り当てられた値の数を返します。オプションのパラメータは 参照渡しにする必要があります。 - - + + format で期待する部分文字列のほうが 実際に string に存在するものより多い場合は &null; を返します。 - + + + オプションのパラメータを使用していて、 + いずれかの値がパースされる前に入力文字列 string + の終端に達した場合は、-1 を返します。 + &reftitle.examples; - - - <function>sscanf</function> の例 - + + <function>sscanf</function> の例 + ]]> - - - - + + + オプションのパラメータが指定された場合、この関数は、代入された値の数を返します。 - - - - <function>sscanf</function> - オプションパラメータの使用法 - + + + <function>sscanf</function> - オプションパラメータの使用法 + \n"; ?> ]]> - - - + + &reftitle.seealso; - - - printf - sprintf - fprintf - vprintf - vsprintf - vfprintf - fscanf - number_format - date - - + + printf + sprintf + fprintf + vprintf + vsprintf + vfprintf + fscanf + number_format + date + diff --git a/reference/url/functions/http-build-query.xml b/reference/url/functions/http-build-query.xml index 7af49a9ecf..5bee2b6008 100644 --- a/reference/url/functions/http-build-query.xml +++ b/reference/url/functions/http-build-query.xml @@ -1,6 +1,6 @@ - + @@ -42,6 +42,14 @@ data がオブジェクトの場合、 public プロパティだけが結果に含められます。 + + + オブジェクトが評価される際に + __toString() マジックメソッドが + 呼び出されることはありません。クエリ文字列でオブジェクトの文字列表現を + 使用するには、オブジェクトを明示的に文字列にキャストする必要があります。 + + @@ -267,6 +275,44 @@ echo http_build_query($parent); + + + + + <link linkend="object.tostring">__toString()</link> を含むオブジェクトでの + <function>http_build_query</function> の使用 + + + 'b', + 'foo' => new Foo() +); + +// キャストしない場合、http_build_query は public プロパティを読み取ります +echo http_build_query($params) . "\n"; + +// 明示的にキャストすると、http_build_query は __toString() の出力を使用します +$params['foo'] = (string) new Foo(); +echo http_build_query($params) . "\n"; +?> +]]> + + &example.outputs; + +