1--TEST--
2IntlCalendar::roll() bool argument variation
3--INI--
4date.timezone=Atlantic/Azores
5--EXTENSIONS--
6intl
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10ini_set("intl.default_locale", "nl");
11
12$intlcal = new IntlGregorianCalendar(2012, 1, 28);
13var_dump($intlcal->roll(IntlCalendar::FIELD_DAY_OF_MONTH, true));
14var_dump($intlcal->get(IntlCalendar::FIELD_MONTH)); //1 (Feb)
15var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); //29
16
17var_dump(intlcal_roll($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH, false));
18var_dump($intlcal->get(IntlCalendar::FIELD_MONTH)); //1 (Feb)
19var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); //28
20
21?>
22--EXPECTF--
23Deprecated: IntlCalendar::roll(): Passing bool is deprecated, use 1 or -1 instead in %s on line %d
24bool(true)
25int(1)
26int(29)
27
28Deprecated: intlcal_roll(): Passing bool is deprecated, use 1 or -1 instead in %s on line %d
29bool(true)
30int(1)
31int(28)
32