1--TEST--
2IntlBreakIterator::preceding(): basic test, ICU >= 58.1
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6	die('skip intl extension not enabled');
7if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU >= 58.1');
8--FILE--
9<?php
10ini_set("intl.error_level", E_WARNING);
11ini_set("intl.default_locale", "pt_PT");
12
13$bi = IntlBreakIterator::createWordInstance('pt');
14$bi->setText('foo bar trans zoo bee');
15
16var_dump($bi->preceding(5));
17var_dump($bi->preceding(50));
18var_dump($bi->preceding(-1));
19?>
20==DONE==
21--EXPECTF--
22int(4)
23int(21)
24int(%i)
25==DONE==
26