mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
844a2dd6ac
`tolower()` returns an `int`, so we must not convert to `char` which may be `signed` and as such may be subject to overflow (actually, implementation defined behavior). Closes GH-6007
14 lines
368 B
PHP
14 lines
368 B
PHP
--TEST--
|
|
Bug #79986 (str_ireplace bug with diacritics characters)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!setlocale(LC_ALL, 'de_DE.ISO-8859-1', 'de-DE')) die('skip German locale not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
setlocale(LC_ALL, 'de_DE.ISO-8859-1', 'de-DE');
|
|
echo str_ireplace(["\xE4", "\xF6", "\xFC"], ['1', '2', '3'], "\xE4\xC4 \xF6\xD6 \xFC\xDC") . PHP_EOL;
|
|
?>
|
|
--EXPECT--
|
|
11 22 33
|