1--TEST-- 2IntlCalendar::createInstance() basic test 3--SKIPIF-- 4<?php 5if (!extension_loaded('intl')) 6 die('skip intl extension not enabled'); 7if (version_compare(INTL_ICU_VERSION, '4.8') < 0) 8 die('skip for ICU 4.8+'); 9--FILE-- 10<?php 11ini_set("intl.error_level", E_WARNING); 12ini_set("intl.default_locale", "nl"); 13 14date_default_timezone_set('Europe/Amsterdam'); 15 16$cal = IntlCalendar::createInstance(); 17print_R($cal->getTimeZone()); 18print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); 19echo "\n"; 20print_R($cal->getType()); 21echo "\n"; 22 23$timeMillis = $cal->getTime(); 24$time = time(); 25 26var_dump(abs($timeMillis - $time * 1000) < 1000); 27 28?> 29==DONE== 30 31--EXPECTF-- 32IntlTimeZone Object 33( 34 [valid] => 1 35 [id] => Europe/Amsterdam 36 [rawOffset] => 3600000 37 [currentOffset] => %d 38) 39nl 40gregorian 41bool(true) 42==DONE== 43