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: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d 24 25Deprecated: IntlCalendar::roll(): Passing bool is deprecated, use 1 or -1 instead in %s on line %d 26bool(true) 27int(1) 28int(29) 29 30Deprecated: intlcal_roll(): Passing bool is deprecated, use 1 or -1 instead in %s on line %d 31bool(true) 32int(1) 33int(28) 34