xref: /PHP-8.0/ext/intl/tests/bug61487.phpt (revision fd0b3990)
1--TEST--
2grapheme() str[i]pos limits
3--SKIPIF--
4<?php if( !extension_loaded( 'intl' ) ) die('skip');
5if (PHP_INT_SIZE != 8) die('skip 64-bit only');
6?>
7--FILE--
8<?php
9try {
10    grapheme_stripos(1,1,2147483648);
11} catch (ValueError $exception) {
12    echo $exception->getMessage() . "\n";
13}
14
15try {
16    grapheme_strpos(1,1,2147483648);
17} catch (ValueError $exception) {
18    echo $exception->getMessage() . "\n";
19}
20?>
21--EXPECT--
22grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
23grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
24