xref: /php-src/ext/intl/tests/bug74264.phpt (revision 097cae9d)
1--TEST--
2Bug #74264 (grapheme_sttrpos() broken for negative offsets)
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7foreach (range(-5, -1) as $offset) {
8    var_dump(
9        grapheme_strrpos('déjàààà', 'à', $offset),
10        grapheme_strripos('DÉJÀÀÀÀ', 'à', $offset)
11    );
12}
13?>
14--EXPECT--
15bool(false)
16bool(false)
17int(3)
18int(3)
19int(4)
20int(4)
21int(5)
22int(5)
23int(6)
24int(6)
25