1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Files
archived-php-src/ext/intl/tests/bug61487.phpt
T
Máté Kocsis fd0b39905c Promote warnings to exceptions in ext/intl
Closes GH-5972
2020-09-07 19:46:55 +02:00

24 lines
598 B
PHP

--TEST--
grapheme() str[i]pos limits
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) die('skip');
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
?>
--FILE--
<?php
try {
grapheme_stripos(1,1,2147483648);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
grapheme_strpos(1,1,2147483648);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
?>
--EXPECT--
grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)