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