mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
0a7ae87e91
Objects of this class can be instantiated with IntlBreakIterator::createCodePointInstance() The method does not take a locale, as it would not make sense in this context. This class has one additional method: long IntlCodePointIterator::getLastCodePoint() which returns either -1 or the last code point we moved over, if any (and discounting any movement before the last call to IntlBreakIterator::first() or IntlBreakIterator::last()).
20 lines
548 B
PHP
20 lines
548 B
PHP
--TEST--
|
|
IntlBreakIterator::getLastCodePoint(): bad args
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('intl'))
|
|
die('skip intl extension not enabled');
|
|
--FILE--
|
|
<?php
|
|
ini_set("intl.error_level", E_WARNING);
|
|
|
|
$it = IntlBreakIterator::createCodePointInstance();
|
|
var_dump($it->getLastCodePoint(array()));
|
|
--EXPECTF--
|
|
|
|
Warning: IntlCodePointBreakIterator::getLastCodePoint() expects exactly 0 parameters, 1 given in %s on line %d
|
|
|
|
Warning: IntlCodePointBreakIterator::getLastCodePoint(): cpbi_get_last_code_point: bad arguments in %s on line %d
|
|
bool(false)
|
|
|