php-src/ext/standard/tests/strings/strtr3.phpt
2006-03-27 14:37:14 +00:00

15 lines
422 B
PHP
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--TEST--
strtr() function (windown-1251 encoding)
--INI--
unicode.script_encoding=windows-1251
unicode.output_encoding=windows-1251
--FILE--
<?php
$trans = array("¤à®¢ "=>"âà ¢ ", "âà ¢ "=>"¤à®¢ ", " "=>"", "¯®¤ ­¨¬¨"=>"­  âà ¢¥");
var_dump(strtr("# <20>  ¤¢®à¥ ¤à®¢ , ¯®¤ ­¨¬¨ âà ¢ . #", $trans));
?>
--EXPECT--
string(35) "# <20>€ ¤¢®à¥ âà ¢ , ­  âà ¢¥ ¤à®¢ . #"
--UEXPECT--
unicode(35) "# <20>€ ¤¢®à¥ âà ¢ , ­  âà ¢¥ ¤à®¢ . #"