Skip to content
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] Update WeakReference::__debugInfo() changelog に関する翻訳 #236

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion language/predefined/weakreference.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 14767af0f05dffa6fdb9b49e1a1f4e9ca7022a60 Maintainer: mumumu Status: ready -->
<!-- EN-Revision: 7caf0c13762e7db3e7002b1286f23b65d940e2d0 Maintainer: mumumu Status: ready -->
<reference xml:id="class.weakreference" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">

<title>WeakReference クラス</title>
Expand All @@ -14,6 +14,10 @@
<para>
弱い参照により、オブジェクトが破棄されるのを妨げないオブジェクトへの参照を保持することが可能です。
この機能は、キャッシュのようなデータ構造を実装するのに役立ちます。
元のオブジェクトが破棄されている場合、<methodname>WeakReference::get</methodname>
メソッドを呼び出すと &null; を返します。
元のオブジェクトは、<link linkend="features.gc.refcounting-basics">refcount</link> が 0 になると破棄されます。
弱い参照を作成しても、参照されているオブジェクトの <literal>refcount</literal> は増加しません。
</para>
<para>
<classname>WeakReference</classname> クラスはシリアライズできません。
Expand Down Expand Up @@ -51,11 +55,16 @@
<programlisting role="php">
<![CDATA[
<?php

$obj = new stdClass;
$weakref = WeakReference::create($obj);

var_dump($weakref->get());

unset($obj);

var_dump($weakref->get());

?>
]]>
</programlisting>
Expand All @@ -71,6 +80,30 @@ NULL
</para>
</section>

<section role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
<methodname>WeakReference::__debugInfo</methodname> の出力に、
参照されたオブジェクトを含むようになりました。また、参照が有効ではなくなっている場合は、
参照されたオブジェクトは <literal>NULL</literal> となります。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>

</partintro>

&language.predefined.weakreference.construct;
Expand Down