]> granicus.if.org Git - php/commitdiff
- Added testcase for bug #27276
authorDerick Rethans <derick@php.net>
Mon, 23 Feb 2004 19:45:16 +0000 (19:45 +0000)
committerDerick Rethans <derick@php.net>
Mon, 23 Feb 2004 19:45:16 +0000 (19:45 +0000)
ext/standard/tests/strings/bug27276.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/strings/bug27276.phpt b/ext/standard/tests/strings/bug27276.phpt
new file mode 100644 (file)
index 0000000..f27e1d5
--- /dev/null
@@ -0,0 +1,15 @@
+--TEST--
+Bug #27276 (str_replace tries to use obscene amounts of ram)
+--FILE--
+<?php
+ini_set("memory_limit", "12m");
+$replacement = str_repeat("x", 12444);
+$string = str_repeat("x", 9432);
+$key =    "{BLURPS}";
+
+str_replace($key, $replacement, $string);
+
+echo "Alive!\n";
+?>
+--EXPECT--
+Alive!