1--TEST-- 2IntlTimeZone::createTimeZoneIDEnumeration(): variant without region 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); 12$enum = IntlTimeZone::createTimeZoneIDEnumeration( 13 IntlTimeZone::TYPE_ANY); 14$countAny = count(iterator_to_array($enum)); 15$enum = IntlTimeZone::createTimeZoneIDEnumeration( 16 IntlTimeZone::TYPE_CANONICAL); 17$countCanonical = count(iterator_to_array($enum)); 18$enum = IntlTimeZone::createTimeZoneIDEnumeration( 19 IntlTimeZone::TYPE_CANONICAL_LOCATION); 20$countCanonicalLocation = count(iterator_to_array($enum)); 21 22var_dump($countAny > $countCanonical); 23var_dump($countCanonical > $countCanonicalLocation); 24 25$enum = IntlTimeZone::createTimeZoneIDEnumeration( 26 IntlTimeZone::TYPE_ANY, null, null); 27$countAny2 = count(iterator_to_array($enum)); 28var_dump($countAny == $countAny2); 29 30$enum = IntlTimeZone::createTimeZoneIDEnumeration( 31 IntlTimeZone::TYPE_ANY, null, -3600000); 32$values = iterator_to_array($enum); 33 34print_r( 35array_values( 36array_intersect($values, 37array('Etc/GMT+1', 'Atlantic/Azores')) 38)); 39 40 41?> 42==DONE== 43--EXPECT-- 44bool(true) 45bool(true) 46bool(true) 47Array 48( 49 [0] => Atlantic/Azores 50 [1] => Etc/GMT+1 51) 52==DONE== 52