mirror of
https://github.com/php/php-src.git
synced 2024-12-15 21:05:51 +08:00
- Added testcase for bug #27276
This commit is contained in:
parent
09d5b95871
commit
769dc0be75
15
ext/standard/tests/strings/bug27276.phpt
Normal file
15
ext/standard/tests/strings/bug27276.phpt
Normal file
@ -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!
|
Loading…
Reference in New Issue
Block a user