mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
d5dd9d59ae
This test case did 100,000 includes of a non existing file to show the memory leak; this is not necessary, because after the first failing include, memory is not supposed to increase for further includes. Closes GH-7088.
15 lines
330 B
PHP
15 lines
330 B
PHP
--TEST--
|
|
Bug #79514 (Memory leaks while including unexistent file)
|
|
--FILE--
|
|
<?php
|
|
$filename = __DIR__ . '/bug79514.doesnotexist';
|
|
@include $filename;
|
|
// Further include should not increase memory usage.
|
|
$mem1 = memory_get_usage();
|
|
@include $filename;
|
|
$mem2 = memory_get_usage();
|
|
var_dump($mem1 == $mem2);
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|