1--TEST--
2NumberFormatter: rounding modes
3--EXTENSIONS--
4intl
5--SKIPIF--
6<?php if (version_compare(INTL_ICU_VERSION, '69.0') < 0) die('skip for ICU >= 69.0'); ?>
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10
11var_dump(NumberFormatter::ROUND_CEILING);
12var_dump(NumberFormatter::ROUND_FLOOR);
13var_dump(NumberFormatter::ROUND_DOWN);
14var_dump(NumberFormatter::ROUND_TOWARD_ZERO);
15var_dump(NumberFormatter::ROUND_UP);
16var_dump(NumberFormatter::ROUND_AWAY_FROM_ZERO);
17var_dump(NumberFormatter::ROUND_HALFEVEN);
18var_dump(NumberFormatter::ROUND_HALFODD);
19var_dump(NumberFormatter::ROUND_HALFDOWN);
20var_dump(NumberFormatter::ROUND_HALFUP);
21
22var_dump(NumberFormatter::ROUND_DOWN === NumberFormatter::ROUND_TOWARD_ZERO);
23var_dump(NumberFormatter::ROUND_UP === NumberFormatter::ROUND_AWAY_FROM_ZERO);
24?>
25--EXPECTF--
26int(0)
27int(1)
28int(2)
29int(2)
30int(3)
31int(3)
32int(4)
33int(8)
34int(5)
35int(6)
36bool(true)
37bool(true)
38