blob: 995eee6f2e7b1e7b82d68b6f84f2ee27a60997be (
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
|
--TEST--
MessageFormatter::setPattern() invalidates arg types cache
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
//ini_set("intl.default_locale", "nl");
$mf = new MessageFormatter('en_US',
"{0,number} -- {1,ordinal}");
var_dump($mf->format(array(1.3, 1.3)));
var_dump($mf->format(array(1.3, 1.3)));
$mf->setPattern("{0,ordinal} -- {1,number}");
var_dump($mf->format(array(1.3, 1.3)));
?>
==DONE==
--EXPECT--
string(10) "1.3 -- 1st"
string(10) "1.3 -- 1st"
string(10) "1st -- 1.3"
==DONE==
|