Skip to content

Commit ef8daec

Browse files
committed
Partial sync of string functions with EN
1 parent 2145bed commit ef8daec

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

reference/strings/functions/echo.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- $Revision$ -->
3-
<!-- EN-Revision: 7a3899eea90f3df8dcfe8fd350900162f3490bed Maintainer: hirokawa Status: ready -->
2+
<!-- EN-Revision: 2a5223230bf6177c225003ca30c63f48ef266cc0 Maintainer: hirokawa Status: ready -->
43
<!-- CREDITS: shimooka,mumumu -->
54
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.echo">
65
<refnamediv>
@@ -136,10 +135,8 @@ echo $some_var ? 'true': 'false'; // 式を最初に評価し、echo に渡し
136135
しかし、これは誤解を招く恐れがあります。
137136
なぜなら、括弧は実際には出力を構成する式の一部であり、
138137
<literal>echo</literal> の文法の一部ではないからです。
139-
</para>
140-
<para>
141-
<example>
142-
<title/>
138+
139+
<informalexample>
143140
<programlisting role="php">
144141
<![CDATA[
145142
<?php
@@ -164,7 +161,7 @@ echo("hello", " world");
164161
?>
165162
]]>
166163
</programlisting>
167-
</example>
164+
</informalexample>
168165
</para>
169166
</note>
170167

reference/strings/functions/htmlentities.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- $Revision$ -->
3-
<!-- EN-Revision: 840ed22479a110ab63bce0fa75d5f3c41642b8e3 Maintainer: takagi Status: ready -->
2+
<!-- EN-Revision: 06394ea77c2f8972e3884c00bede861ef5eb04da Maintainer: takagi Status: ready -->
43
<!-- CREDITS: hirokawa,shimooka,mumumu -->
54
<refentry xml:id="function.htmlentities" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
65
<refnamediv>
@@ -201,14 +200,20 @@
201200
<?php
202201
$str = "A 'quote' is <b>bold</b>";
203202
204-
// 出力: A 'quote' is &lt;b&gt;bold&lt;/b&gt;
205203
echo htmlentities($str);
206-
207-
// 出力: A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt;
208-
echo htmlentities($str, ENT_QUOTES);
204+
echo "\n\n";
205+
echo htmlentities($str, ENT_COMPAT);
209206
?>
210207
]]>
211208
</programlisting>
209+
&example.outputs;
210+
<screen>
211+
<![CDATA[
212+
A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt;
213+
214+
A 'quote' is &lt;b&gt;bold&lt;/b&gt
215+
]]>
216+
</screen>
212217
</example>
213218
</para>
214219

reference/strings/functions/print.xml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 7a3899eea90f3df8dcfe8fd350900162f3490bed Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: 2a5223230bf6177c225003ca30c63f48ef266cc0 Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: shimooka,mumumu -->
55
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.print">
66
<refnamediv>
@@ -112,9 +112,8 @@ if ( print "hello" ) {
112112
しかし、これは誤解を招く恐れがあります。
113113
なぜなら、括弧は実際には出力を構成する式の一部であり、
114114
<literal>print</literal> の文法の一部ではないからです。
115-
</para>
116-
<para>
117-
<example>
115+
116+
<informalexample>
118117
<title/>
119118
<programlisting role="php">
120119
<![CDATA[
@@ -142,17 +141,14 @@ else {
142141
?>
143142
]]>
144143
</programlisting>
145-
</example>
144+
</informalexample>
146145
</para>
147146

148147
<para>
149148
<literal>print</literal> を大きな式で使う場合、
150149
意図した結果を得るためには、キーワードと引数を括弧で囲む必要があるかもしれません:
151-
</para>
152150

153-
<para>
154-
<example>
155-
<title/>
151+
<informalexample>
156152
<programlisting role="php">
157153
<![CDATA[
158154
<?php
@@ -176,7 +172,7 @@ print "hello " && print "world";
176172
?>
177173
]]>
178174
</programlisting>
179-
</example>
175+
</informalexample>
180176
</para>
181177
</note>
182178

0 commit comments

Comments
 (0)