reference/strings/functions/money-format.xml
06313c3bb195d974aeba8f4364a6739833b18768
06313c3bb195d974aeba8f4364a6739833b18768
...
...
@@ -6,6 +6,10 @@
6
6
<refpurpose>Formats a number as a currency string</refpurpose>
7
7
</refnamediv>
8
8
9
+
<refsynopsisdiv>
10
+
&warn.deprecated.function-7-4-0.removed-8-0-0;
11
+
</refsynopsisdiv>
12
+
9
13
<refsect1 role="description">
10
14
&reftitle.description;
11
15
<methodsynopsis>
...
...
@@ -162,7 +166,7 @@
162
166
value of <replaceable>p</replaceable> is 0 (zero), the decimal
163
167
character and the digits to its right will be omitted. If no right
164
168
precision is included, the default will dictated by the current
165
-
local in use. The amount being formatted is rounded to the specified
169
+
locale in use. The amount being formatted is rounded to the specified
166
170
number of digits prior to formatting.
167
171
</para>
168
172
</listitem>
...
...
@@ -229,22 +233,35 @@
229
233
</para>
230
234
</refsect1>
231
235
232
-
<refsect1 role="notes">
233
-
&reftitle.notes;
234
-
<note>
235
-
<para>
236
-
The function <function>money_format</function> is only defined if
237
-
the system has strfmon capabilities. For example, Windows does
238
-
not, so <function>money_format</function> is undefined in Windows.
239
-
</para>
240
-
</note>
241
-
<note>
242
-
<para>
243
-
The <constant>LC_MONETARY</constant> category of the locale settings,
244
-
affects the behavior of this function. Use <function>setlocale</function>
245
-
to set to the appropriate default locale before using this function.
246
-
</para>
247
-
</note>
236
+
<refsect1 role="changelog">
237
+
&reftitle.changelog;
238
+
<para>
239
+
<informaltable>
240
+
<tgroup cols="2">
241
+
<thead>
242
+
<row>
243
+
<entry>&Version;</entry>
244
+
<entry>&Description;</entry>
245
+
</row>
246
+
</thead>
247
+
<tbody>
248
+
<row>
249
+
<entry>8.0.0</entry>
250
+
<entry>
251
+
&removed.function;
252
+
</entry>
253
+
</row>
254
+
<row>
255
+
<entry>7.4.0</entry>
256
+
<entry>
257
+
&deprecated.function; Instead,
258
+
use <methodname>NumberFormatter::formatCurrency</methodname>.
259
+
</entry>
260
+
</row>
261
+
</tbody>
262
+
</tgroup>
263
+
</informaltable>
264
+
</para>
248
265
</refsect1>
249
266
250
267
<refsect1 role="examples">
...
...
@@ -287,7 +304,7 @@ echo money_format('%=*(#10.2n', $number) . "\n";
287
304
// ($********1,234.57)
288
305
289
306
// Let's justify to the left, with 14 positions of width, 8 digits of
290
-
// left precision, 2 of right precision, withouth grouping character
307
+
// left precision, 2 of right precision, without the grouping character
291
308
// and using the international format for the de_DE locale.
292
309
setlocale(LC_MONETARY, 'de_DE');
293
310
echo money_format('%=*^-14#8.2i', 1234.56) . "\n";
...
...
@@ -306,6 +323,24 @@ echo money_format($fmt, 1234.56) . "\n";
306
323
</para>
307
324
</refsect1>
308
325
326
+
<refsect1 role="notes">
327
+
&reftitle.notes;
328
+
<note>
329
+
<para>
330
+
The function <function>money_format</function> is only defined if
331
+
the system has strfmon capabilities. For example, Windows does
332
+
not, so <function>money_format</function> is undefined in Windows.
333
+
</para>
334
+
</note>
335
+
<note>
336
+
<para>
337
+
The <constant>LC_MONETARY</constant> category of the locale settings,
338
+
affects the behavior of this function. Use <function>setlocale</function>
339
+
to set to the appropriate default locale before using this function.
340
+
</para>
341
+
</note>
342
+
</refsect1>
343
+
309
344
<refsect1 role="seealso">
310
345
&reftitle.seealso;
311
346
<para>
312
347