1--TEST--
2IntlCalendar::set() argument variations
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 = IntlCalendar::createInstance('UTC');
13$intlcal->clear();
14var_dump($intlcal->set(2012, 1, 29));
15var_dump($intlcal->getTime(),
16        strtotime('2012-02-29 00:00:00 +0000') * 1000.);
17
18//two minutes to midnight!
19var_dump($intlcal->set(2012, 1, 29, 23, 58));
20var_dump($intlcal->getTime(),
21        strtotime('2012-02-29 23:58:00 +0000') * 1000.);
22
23var_dump($intlcal->set(2012, 1, 29, 23, 58, 31));
24var_dump($intlcal->getTime(),
25        strtotime('2012-02-29 23:58:31 +0000') * 1000.);
26
27?>
28--EXPECTF--
29Deprecated: Calling IntlCalendar::set() with more than 2 arguments is deprecated, use either IntlCalendar::setDate() or IntlCalendar::setDateTime() instead in %s on line %d
30bool(true)
31float(1330473600000)
32float(1330473600000)
33
34Deprecated: Calling IntlCalendar::set() with more than 2 arguments is deprecated, use either IntlCalendar::setDate() or IntlCalendar::setDateTime() instead in %s on line %d
35bool(true)
36float(1330559880000)
37float(1330559880000)
38
39Deprecated: Calling IntlCalendar::set() with more than 2 arguments is deprecated, use either IntlCalendar::setDate() or IntlCalendar::setDateTime() instead in %s on line %d
40bool(true)
41float(1330559911000)
42float(1330559911000)
43