1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00
Files
archived-php-src/ext/mbstring/tests/casefolding.phpt
Nikita Popov 9ac7c1e71d Use case-folding for case insensitive comparisons
Instead of using lowercasing.
2017-07-28 12:32:50 +02:00

39 lines
492 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
--TEST--
Case-insensitive string comparisons use case folding
--FILE--
<?php
$tests = [
["K", ""],
["k", ""],
["Å", ""],
["å", ""],
["ß", ""],
["Θ", "ϴ"],
["θ", "ϴ"],
["ϑ", "ϴ"],
["Ω", ""],
["ω", ""],
["I", "ı"],
["i", "ı"],
];
foreach ($tests as list($a, $b)) {
var_dump(mb_stripos($a, $b));
}
?>
--EXPECT--
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
bool(false)
bool(false)