1--TEST-- 2IntlBreakIterator::preceding(): basic test, ICU <= 57.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 <= 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==DONE== 22--EXPECT-- 23int(4) 24int(21) 25int(0) 26==DONE== 27