1--TEST--
2IntlRuleBasedBreakIterator::__construct: 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\$S+ {42};
19!!reverse;
20\$LN+ {1};
21\$S+ {42};
22!!safe_forward;
23!!safe_reverse;
24RULES;
25$rbbi = new IntlRuleBasedBreakIterator($rules);
26var_dump(get_class($rbbi));
27
28try {
29	$obj = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+', 'aoeu');
30} catch (IntlException $e) {
31	var_dump(intl_get_error_code(), intl_get_error_message());
32}
33
34?>
35==DONE==
36--EXPECT--
37string(26) "IntlRuleBasedBreakIterator"
38int(1)
39string(93) "rbbi_create_instance: unable to create instance from compiled rules: U_ILLEGAL_ARGUMENT_ERROR"
40==DONE==
41