xref: /PHP-8.0/ext/intl/tests/bug74264.phpt (revision 28c93763)
1--TEST--
2Bug #74264 (grapheme_sttrpos() broken for negative offsets)
3--SKIPIF--
4<?php
5if (!extension_loaded('intl')) die("skip intl extension not available");
6?>
7--FILE--
8<?php
9foreach (range(-5, -1) as $offset) {
10    var_dump(
11        grapheme_strrpos('déjàààà', 'à', $offset),
12        grapheme_strripos('DÉJÀÀÀÀ', 'à', $offset)
13    );
14}
15?>
16--EXPECT--
17bool(false)
18bool(false)
19int(3)
20int(3)
21int(4)
22int(4)
23int(5)
24int(5)
25int(6)
26int(6)
27