blob: baafb00cedffc3da858e6e49b9f345d7656375a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--TEST--
Bug #76942 U_ARGUMENT_TYPE_MISMATCH
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
?>
--FILE--
<?php
$locale = 'nl';
$message = '{0,number,#,###.##} MB';
$vars = [
7.1234
];
$formatter = new MessageFormatter($locale, $message);
if (!$formatter) {
throw new Exception(intl_get_error_message(), intl_get_error_code());
}
$result = $formatter->format($vars);
if ($result === false) {
throw new Exception($formatter->getErrorMessage(), $formatter->getErrorCode());
}
var_dump($result);
?>
==DONE==
--EXPECT--
string(7) "7,12 MB"
==DONE==
|