2007-06-06 17:13:18 +00:00
|
|
|
--TEST--
|
|
|
|
money_format test
|
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
|
|
|
if (!function_exists('money_format') || !function_exists('setlocale')) {
|
|
|
|
die("SKIP money_format - not supported\n");
|
|
|
|
}
|
2008-01-27 16:52:34 +00:00
|
|
|
|
2008-01-27 16:54:02 +00:00
|
|
|
if (setlocale(LC_MONETARY, 'en_US') === false) {
|
2008-01-27 16:52:34 +00:00
|
|
|
die('skip en_US locale not available');
|
|
|
|
}
|
2007-06-06 17:13:18 +00:00
|
|
|
?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
setlocale(LC_MONETARY, 'en_US');
|
|
|
|
var_dump( money_format("X%nY", 3.1415));
|
|
|
|
var_dump(money_format("AAAAA%n%n%n%n", NULL));
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
string(7) "X$3.14Y"
|
|
|
|
|
2007-06-06 17:47:15 +00:00
|
|
|
Warning: money_format(): Only a single %ci or %cn token can be used in %s on line %d
|
2007-06-06 17:13:18 +00:00
|
|
|
bool(false)
|
2007-10-01 12:01:28 +00:00
|
|
|
--UEXPECTF--
|
2008-02-24 02:22:15 +00:00
|
|
|
Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d
|
2007-10-01 12:01:28 +00:00
|
|
|
unicode(7) "X$3.14Y"
|
|
|
|
|
2008-02-24 02:22:15 +00:00
|
|
|
Warning: money_format(): Only a single %ci or %cn token can be used in %s on line %d
|
2007-10-01 12:01:28 +00:00
|
|
|
bool(false)
|