File tree Expand file tree Collapse file tree 3 files changed +21
-23
lines changed
reference/strings/functions Expand file tree Collapse file tree 3 files changed +21
-23
lines changed Original file line number Diff line number Diff line change 1
1
<?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 -->
4
3
<!-- CREDITS: shimooka,mumumu -->
5
4
<refentry xmlns : xlink =" http://www.w3.org/1999/xlink" xmlns =" http://docbook.org/ns/docbook" xml : id =" function.echo" >
6
5
<refnamediv >
@@ -136,10 +135,8 @@ echo $some_var ? 'true': 'false'; // 式を最初に評価し、echo に渡し
136
135
しかし、これは誤解を招く恐れがあります。
137
136
なぜなら、括弧は実際には出力を構成する式の一部であり、
138
137
<literal >echo</literal > の文法の一部ではないからです。
139
- </para >
140
- <para >
141
- <example >
142
- <title />
138
+
139
+ <informalexample >
143
140
<programlisting role =" php" >
144
141
<![CDATA[
145
142
<?php
@@ -164,7 +161,7 @@ echo("hello", " world");
164
161
?>
165
162
]]>
166
163
</programlisting >
167
- </example >
164
+ </informalexample >
168
165
</para >
169
166
</note >
170
167
Original file line number Diff line number Diff line change 1
1
<?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 -->
4
3
<!-- CREDITS: hirokawa,shimooka,mumumu -->
5
4
<refentry xml : id =" function.htmlentities" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
6
5
<refnamediv >
201
200
<?php
202
201
$str = "A 'quote' is <b>bold</b>";
203
202
204
- // 出力: A 'quote' is <b>bold</b>
205
203
echo htmlentities($str);
206
-
207
- // 出力: A 'quote' is <b>bold</b>
208
- echo htmlentities($str, ENT_QUOTES);
204
+ echo "\n\n";
205
+ echo htmlentities($str, ENT_COMPAT);
209
206
?>
210
207
]]>
211
208
</programlisting >
209
+ &example.outputs;
210
+ <screen >
211
+ <![CDATA[
212
+ A 'quote' is <b>bold</b>
213
+
214
+ A 'quote' is <b>bold</b>
215
+ ]]>
216
+ </screen >
212
217
</example >
213
218
</para >
214
219
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<!-- $Revision$ -->
3
- <!-- EN-Revision: 7a3899eea90f3df8dcfe8fd350900162f3490bed Maintainer: hirokawa Status: ready -->
3
+ <!-- EN-Revision: 2a5223230bf6177c225003ca30c63f48ef266cc0 Maintainer: hirokawa Status: ready -->
4
4
<!-- CREDITS: shimooka,mumumu -->
5
5
<refentry xmlns : xlink =" http://www.w3.org/1999/xlink" xmlns =" http://docbook.org/ns/docbook" xml : id =" function.print" >
6
6
<refnamediv >
@@ -112,9 +112,8 @@ if ( print "hello" ) {
112
112
しかし、これは誤解を招く恐れがあります。
113
113
なぜなら、括弧は実際には出力を構成する式の一部であり、
114
114
<literal >print</literal > の文法の一部ではないからです。
115
- </para >
116
- <para >
117
- <example >
115
+
116
+ <informalexample >
118
117
<title />
119
118
<programlisting role =" php" >
120
119
<![CDATA[
@@ -142,17 +141,14 @@ else {
142
141
?>
143
142
]]>
144
143
</programlisting >
145
- </example >
144
+ </informalexample >
146
145
</para >
147
146
148
147
<para >
149
148
<literal >print</literal > を大きな式で使う場合、
150
149
意図した結果を得るためには、キーワードと引数を括弧で囲む必要があるかもしれません:
151
- </para >
152
150
153
- <para >
154
- <example >
155
- <title />
151
+ <informalexample >
156
152
<programlisting role =" php" >
157
153
<![CDATA[
158
154
<?php
@@ -176,7 +172,7 @@ print "hello " && print "world";
176
172
?>
177
173
]]>
178
174
</programlisting >
179
- </example >
175
+ </informalexample >
180
176
</para >
181
177
</note >
182
178
You can’t perform that action at this time.
0 commit comments