1--TEST-- 2IntlRuleBasedBreakIterator::getRuleStatusVec(): basic test 3--SKIPIF-- 4<?php 5if (!extension_loaded('intl')) 6 die('skip intl extension not enabled'); 7--FILE-- 8<?php 9ini_set("intl.error_level", E_WARNING); 10ini_set("intl.default_locale", "pt_PT"); 11 12$rules = <<<RULES 13\$LN = [[:letter:] [:number:]]; 14\$S = [.;,:]; 15 16!!forward; 17\$LN+ {1}; 18[^.]+ {4}; 19\$S+ {42}; 20!!reverse; 21\$LN+ {1}; 22[^.]+ {4}; 23\$S+ {42}; 24!!safe_forward; 25!!safe_reverse; 26RULES; 27$rbbi = new IntlRuleBasedBreakIterator($rules); 28$rbbi->setText('sdfkjsdf88á.... ,;'); 29 30do { 31 var_dump($rbbi->current(), $rbbi->getRuleStatusVec()); 32} while ($rbbi->next() != IntlBreakIterator::DONE); 33 34?> 35--EXPECT-- 36int(0) 37array(1) { 38 [0]=> 39 int(0) 40} 41int(12) 42array(2) { 43 [0]=> 44 int(1) 45 [1]=> 46 int(4) 47} 48int(16) 49array(1) { 50 [0]=> 51 int(42) 52} 53int(19) 54array(1) { 55 [0]=> 56 int(4) 57} 58