1--TEST-- 2IntlBreakIterator::getPartsIterator(): argument variations 3--EXTENSIONS-- 4intl 5--FILE-- 6<?php 7ini_set("intl.error_level", E_WARNING); 8ini_set("intl.default_locale", "pt_PT"); 9 10$text = 'foo bar tao'; 11 12$it = IntlBreakIterator::createWordInstance(NULL); 13$it->setText($text); 14 15var_dump(iterator_to_array($it->getPartsIterator(IntlPartsIterator::KEY_SEQUENTIAL))); 16var_dump(iterator_to_array($it->getPartsIterator(IntlPartsIterator::KEY_LEFT))); 17var_dump(iterator_to_array($it->getPartsIterator(IntlPartsIterator::KEY_RIGHT))); 18 19?> 20--EXPECT-- 21array(5) { 22 [0]=> 23 string(3) "foo" 24 [1]=> 25 string(1) " " 26 [2]=> 27 string(3) "bar" 28 [3]=> 29 string(1) " " 30 [4]=> 31 string(3) "tao" 32} 33array(5) { 34 [0]=> 35 string(3) "foo" 36 [3]=> 37 string(1) " " 38 [4]=> 39 string(3) "bar" 40 [7]=> 41 string(1) " " 42 [8]=> 43 string(3) "tao" 44} 45array(5) { 46 [3]=> 47 string(3) "foo" 48 [4]=> 49 string(1) " " 50 [7]=> 51 string(3) "bar" 52 [8]=> 53 string(1) " " 54 [11]=> 55 string(3) "tao" 56} 57