]> granicus.if.org Git - php/commitdiff
test for bug #27457
authorfoobar <sniper@php.net>
Tue, 9 Mar 2004 14:19:50 +0000 (14:19 +0000)
committerfoobar <sniper@php.net>
Tue, 9 Mar 2004 14:19:50 +0000 (14:19 +0000)
ext/standard/tests/strings/bug27457.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/strings/bug27457.phpt b/ext/standard/tests/strings/bug27457.phpt
new file mode 100644 (file)
index 0000000..6f5ec05
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+Bug #27457 (Problem with strtr() and translation array)
+--FILE--
+<?php
+       $test = "Dot in brackets [.]\n";
+       echo $test;
+       $test = strtr($test, array('.' => '0'));
+       echo $test;
+       $test = strtr($test, array('0' => '.'));
+       echo $test;
+       $test = strtr($test, '.', '0');
+       echo $test;
+       $test = strtr($test, '0', '.');
+       echo $test;
+?>
+--EXPECT--
+Dot in brackets [.]
+Dot in brackets [0]
+Dot in brackets [.]
+Dot in brackets [0]
+Dot in brackets [.]