]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_4_3'.
authorSVN Migration <svn@php.net>
Sat, 27 Sep 2003 18:48:49 +0000 (18:48 +0000)
committerSVN Migration <svn@php.net>
Sat, 27 Sep 2003 18:48:49 +0000 (18:48 +0000)
ext/mbstring/tests/php_gr_jp_dev_884-1.phpt [new file with mode: 0644]
ext/mbstring/tests/php_gr_jp_dev_884-2.phpt [new file with mode: 0644]
ext/standard/tests/strings/bug25671.phpt [new file with mode: 0644]

diff --git a/ext/mbstring/tests/php_gr_jp_dev_884-1.phpt b/ext/mbstring/tests/php_gr_jp_dev_884-1.phpt
new file mode 100644 (file)
index 0000000..5f19858
--- /dev/null
@@ -0,0 +1,13 @@
+--TEST--
+php-dev@php.gr.jp #884 (1)
+--FILE--
+<?php
+set_time_limit(2);
+var_dump(ereg_replace(".*", "b", "a"));
+var_dump(preg_replace("/.*/", "b", "a"));
+var_dump(mb_ereg_replace(".*", "b", "a"));
+?>
+--EXPECT--
+string(2) "bb"
+string(2) "bb"
+string(2) "bb"
diff --git a/ext/mbstring/tests/php_gr_jp_dev_884-2.phpt b/ext/mbstring/tests/php_gr_jp_dev_884-2.phpt
new file mode 100644 (file)
index 0000000..a93f3f6
--- /dev/null
@@ -0,0 +1,14 @@
+--TEST--
+php-dev@php.gr.jp #884 (2)
+--FILE--
+<?php
+var_dump(mb_ereg_replace("C?$", "Z", "ABC"));
+var_dump(ereg_replace("C?$", "Z", "ABC"));
+var_dump(mb_ereg_replace("C*$", "Z", "ABC"));
+var_dump(ereg_replace("C*$", "Z", "ABC"));
+?>
+--EXPECT--
+string(4) "ABZZ"
+string(4) "ABZZ"
+string(4) "ABZZ"
+string(4) "ABZZ"
diff --git a/ext/standard/tests/strings/bug25671.phpt b/ext/standard/tests/strings/bug25671.phpt
new file mode 100644 (file)
index 0000000..ac64790
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+Bug #25671 (subarrays not copied correctly)
+--FILE--
+<?php
+  $arr = array(
+       "This is string one.",
+       "This is string two.",
+       array(
+               "This is another string.",
+               "This is a last string."),
+       "This is a last string.");
+
+  echo serialize(str_replace("string", "strung", $arr)) . "\n";
+  echo serialize(str_replace("string", "strung", $arr)) . "\n";
+  echo serialize(str_replace(" ", "", $arr)) . "\n";
+  echo serialize(str_replace(" ", "", $arr)) . "\n";
+?>
+--EXPECT--
+a:4:{i:0;s:19:"This is strung one.";i:1;s:19:"This is strung two.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:22:"This is a last strung.";}
+a:4:{i:0;s:19:"This is strung one.";i:1;s:19:"This is strung two.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:22:"This is a last strung.";}
+a:4:{i:0;s:16:"Thisisstringone.";i:1;s:16:"Thisisstringtwo.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:18:"Thisisalaststring.";}
+a:4:{i:0;s:16:"Thisisstringone.";i:1;s:16:"Thisisstringtwo.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:18:"Thisisalaststring.";}
+