php-src/Zend/tests/bug79514.phpt
Christoph M. Becker d5dd9d59ae
Speed up test case
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.
2021-06-02 23:19:38 +02:00

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)