1--TEST-- 2IntlBreakIterator::getPartsIterator(): basic test, ICU >= 58.1 3--SKIPIF-- 4<?php 5if (!extension_loaded('intl')) 6 die('skip intl extension not enabled'); 7if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU >= 58.1'); 8?> 9--FILE-- 10<?php 11ini_set("intl.error_level", E_WARNING); 12ini_set("intl.default_locale", "pt_PT"); 13 14$bi = IntlBreakIterator::createWordInstance('pt'); 15$pi = $bi->getPartsIterator(); 16var_dump(get_class($pi)); 17print_r(iterator_to_array($pi)); 18 19$bi->setText("foo bar"); 20$pi = $bi->getPartsIterator(); 21var_dump(get_class($pi->getBreakIterator())); 22print_r(iterator_to_array($pi)); 23var_dump($pi->getRuleStatus()); 24?> 25--EXPECTF-- 26string(17) "IntlPartsIterator" 27Array 28( 29) 30string(26) "IntlRuleBasedBreakIterator" 31Array 32( 33 [0] => foo 34 [1] => 35 [2] => bar 36) 37int(%d) 38