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==DONE==
36--EXPECT--
37int(0)
38array(1) {
39  [0]=>
40  int(0)
41}
42int(12)
43array(2) {
44  [0]=>
45  int(1)
46  [1]=>
47  int(4)
48}
49int(16)
50array(1) {
51  [0]=>
52  int(42)
53}
54int(19)
55array(1) {
56  [0]=>
57  int(4)
58}
59==DONE==
60