]> granicus.if.org Git - php/commitdiff
Deprecate money_format()
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 11 Jul 2019 15:12:08 +0000 (17:12 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 22 Jul 2019 09:39:52 +0000 (11:39 +0200)
ext/standard/basic_functions.c
ext/standard/tests/strings/money_format_basic1.phpt
ext/standard/tests/strings/money_format_error.phpt
ext/standard/tests/strings/moneyformat.phpt

index 2e3ef19bb784dfff126ab1e27f456628c0a79f71..0e11c1c088faa301a7c14eef3ecefecd167d2fd6 100644 (file)
@@ -2804,7 +2804,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
        PHP_FE(strcoll,                                                                                                                 arginfo_strcoll)
 
 #ifdef HAVE_STRFMON
-       PHP_FE(money_format,                                                                                                    arginfo_money_format)
+       PHP_DEP_FE(money_format,                                                                                                arginfo_money_format)
 #endif
 
        PHP_FE(substr,                                                                                                                  arginfo_substr)
index dc9b167ebf66b73996e66845abf77fb91cc025a2..a9e8f708188dc6e439155e4adaad3b1091f1095a 100644 (file)
@@ -56,24 +56,48 @@ echo gettype(money_format('%=*!14#8.2n', $negative_value))."\n";
 
 ?>
 ===DONE===
---EXPECT--
+--EXPECTF--
 *** Testing money_format() : basic functionality***
 Format values with 14 positions, 8 digits to left, 2 to right using national format
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
 Format again but with ( for negative values
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
 Format with 0 for padding character
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
 Format again with * for padding character
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
 Format again but disable grouping character
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
 Format again suppress currency symbol
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
+
+Deprecated: Function money_format() is deprecated in %s on line %d
 string
 ===DONE===
index 454b593537706806369cbb3d33edb45132049e7c..da725a4131415cd73aac52a16915ae83a76ab3be 100644 (file)
@@ -41,21 +41,29 @@ var_dump( money_format($string . $string, $value) );
 
 -- Testing money_format() function with no arguments --
 
+Deprecated: Function money_format() is deprecated in %s on line %d
+
 Warning: money_format() expects exactly 2 parameters, 0 given in %s on line %d
 NULL
 
 -- Testing money_format() function with insufficient arguments --
 
+Deprecated: Function money_format() is deprecated in %s on line %d
+
 Warning: money_format() expects exactly 2 parameters, 1 given in %s on line %d
 NULL
 
 -- Testing money_format() function with more than expected no. of arguments --
 
+Deprecated: Function money_format() is deprecated in %s on line %d
+
 Warning: money_format() expects exactly 2 parameters, 3 given in %s on line %d
 NULL
 
 -- Testing money_format() function with more than one token --
 
+Deprecated: Function money_format() is deprecated in %s on line %d
+
 Warning: money_format(): Only a single %ci or %cn token can be used in %s on line %d
 bool(false)
 ===DONE===
index 0eec563a39067664fe4f94785c93f37e89a70458..9c10148f7db87fd1d063ed033ff35799ce86f44b 100644 (file)
@@ -15,5 +15,6 @@ if (setlocale(LC_MONETARY, 'en_US') === false) {
 setlocale(LC_MONETARY, 'en_US');
 var_dump( money_format("X%nY", 3.1415));
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: Function money_format() is deprecated in %s on line %d
 string(7) "X$3.14Y"