1--TEST-- 2IntlBreakIterator::preceding(): basic test, ICU >= 58.1 3--EXTENSIONS-- 4intl 5--SKIPIF-- 6<?php 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--EXPECTF-- 21int(4) 22int(21) 23int(%i) 24