xref: /PHP-8.0/ext/mbstring/tests/casefolding.phpt (revision c6c9e71a)
1--TEST--
2Case-insensitive string comparisons use case folding
3--SKIPIF--
4<?php require 'skipif.inc'; ?>
5--FILE--
6<?php
7
8$tests = [
9    ["K", "K"],
10    ["k", "K"],
11    ["Å", "Å"],
12    ["å", "Å"],
13    ["ß", "ẞ"],
14    ["Θ", "ϴ"],
15    ["θ", "ϴ"],
16    ["ϑ", "ϴ"],
17    ["Ω", "Ω"],
18    ["ω", "Ω"],
19    ["I", "ı"],
20    ["i", "ı"],
21];
22
23foreach ($tests as list($a, $b)) {
24    var_dump(mb_stripos($a, $b));
25}
26
27?>
28--EXPECT--
29int(0)
30int(0)
31int(0)
32int(0)
33int(0)
34int(0)
35int(0)
36int(0)
37int(0)
38int(0)
39bool(false)
40bool(false)
41