1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 09:42:22 +01:00
Files
archived-php-src/ext/standard/tests/strings/bug69144.phpt

16 lines
423 B
PHP

--TEST--
Bug #69144 (strtr not replacing with partly matching replace pairs)
--FILE--
<?php
$tests = array('bar' => '', 'foo' => 'o', 'foobar' => '', 'hello' => 'hello');
foreach ($tests as $input => $expected) {
if ($expected !== ($actual = strtr($input, array("fo" => "", "foobar" => "", "bar" => "")))) {
echo "KO `$input` became `$actual` instead of `$expected`\n";
}
}
echo "okey";
?>
--EXPECT--
okey