Skip to content

doc-en と同期し control-structures のコード例を実行可能な形式に更新(16ファイル)#416

Merged
KentarouTakeda merged 1 commit into
php:masterfrom
KentarouTakeda:sync-control-structures-runnable-examples
Jul 26, 2026
Merged

doc-en と同期し control-structures のコード例を実行可能な形式に更新(16ファイル)#416
KentarouTakeda merged 1 commit into
php:masterfrom
KentarouTakeda:sync-control-structures-runnable-examples

Conversation

@KentarouTakeda

@KentarouTakeda KentarouTakeda commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

原文の php/doc-en#5462 に追随し、language/control-structures 配下の 16 ファイルを同期しました。

コード例の実行可能化(16件) — php/doc-en@b8147b7

  • 複数の例を informalexample 単位に分割し、&example.outputs; + <screen> の出力ブロックを追加
  • 例中で未定義だった変数の初期化を補い、末尾の ?> を除去
  • 実行対象外の例に annotations="non-interactive"language/control-structures.xml<chapter>annotations="interactive" を付与

<screen> の内容は、各ファイルの訳文コードが実際に出力する内容に合わせています。コード中の文字列が訳出済みの箇所は日本語、PHP 本体が出力するメッセージは原文のままです。

対象: control-structures.xml, alternative-syntax.xml, break.xml, continue.xml,
declare.xml, do-while.xml, else.xml, elseif.xml, for.xml, foreach.xml, goto.xml,
if.xml, include.xml, match.xml, switch.xml, while.xml

原文側の内容変更の反映(3件)

  • switch.xml — case のセミコロン構文が PHP 8.5.0 で非推奨になった旨の記述を追加(php/doc-en@b8147b7)
  • continue.xml — continue 後のセミコロン省略に関する段落が原文で削除されたため、対応する訳文を削除(php/doc-en@b8147b7)
  • else.xml — 原文の綴りの誤りの修正に追随(php/doc-en@690c3ea)。訳文への影響はありません

@KentarouTakeda
KentarouTakeda force-pushed the sync-control-structures-runnable-examples branch from acdb3b2 to d02aa8f Compare July 26, 2026 11:04
原文の php/doc-en#5462 に追随し、language/control-structures 配下の 16 ファイルを同期しました。

### コード例の実行可能化(16件) — php/doc-en@b8147b7

- 複数の例を `informalexample` 単位に分割し、`&example.outputs;` + `<screen>` の出力ブロックを追加
- 例中で未定義だった変数の初期化を補い、末尾の `?>` を除去
- 実行対象外の例に `annotations="non-interactive"`、`language/control-structures.xml` の `<chapter>` に `annotations="interactive"` を付与

`<screen>` の内容は、各ファイルの訳文コードが実際に出力する内容に合わせています。コード中の文字列が訳出済みの箇所は日本語、PHP 本体が出力するメッセージは原文のままです。

対象: control-structures.xml, alternative-syntax.xml, break.xml, continue.xml,
declare.xml, do-while.xml, else.xml, elseif.xml, for.xml, foreach.xml, goto.xml,
if.xml, include.xml, match.xml, switch.xml, while.xml

### 原文側の内容変更の反映(3件)

- switch.xml — case のセミコロン構文が PHP 8.5.0 で非推奨になった旨の記述を追加(php/doc-en@b8147b7)
- continue.xml — `continue` 後のセミコロン省略に関する段落が原文で削除されたため、対応する訳文を削除(php/doc-en@b8147b7)
- else.xml — 原文の綴りの誤りの修正に追随(php/doc-en@690c3ea)。訳文への影響はありません
@KentarouTakeda
KentarouTakeda force-pushed the sync-control-structures-runnable-examples branch from d02aa8f to e49a055 Compare July 26, 2026 11:11
@KentarouTakeda
KentarouTakeda merged commit 86a4f2b into php:master Jul 26, 2026
2 checks passed
@KentarouTakeda
KentarouTakeda deleted the sync-control-structures-runnable-examples branch July 26, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant