1--TEST-- 2IntlRuleBasedBreakIterator::getRuleStatus(): basic test 3--EXTENSIONS-- 4intl 5--FILE-- 6<?php 7ini_set("intl.error_level", E_WARNING); 8ini_set("intl.default_locale", "pt_PT"); 9 10$rules = <<<RULES 11\$LN = [[:letter:] [:number:]]; 12\$S = [.;,:]; 13 14!!forward; 15\$LN+ {1}; 16\$S+ {42}; 17!!reverse; 18\$LN+ {1}; 19\$S+ {42}; 20!!safe_forward; 21!!safe_reverse; 22RULES; 23$rbbi = new IntlRuleBasedBreakIterator($rules); 24$rbbi->setText('sdfkjsdf88á.... ,;'); 25 26do { 27 echo "pos : {$rbbi->current()}\n", 28 "rule status: {$rbbi->getRuleStatus()}\n"; 29} while ($rbbi->next() != IntlBreakIterator::DONE); 30 31?> 32--EXPECT-- 33pos : 0 34rule status: 0 35pos : 12 36rule status: 1 37pos : 16 38rule status: 42 39pos : 17 40rule status: 0 41pos : 19 42rule status: 42 43