mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Deprecate money_format()
This commit is contained in:
parent
4e4d8a4a6c
commit
b1cdf06673
@ -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)
|
||||
|
@ -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===
|
||||
|
@ -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===
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user