xref: /PHP-7.2/ext/standard/tests/file/bug71882.phpt (revision 29706301)
1--TEST--
2Bug #71882 (Negative ftruncate() on php://memory exhausts memory)
3--FILE--
4<?php
5$fd = fopen("php://memory", "w+");
6var_dump(ftruncate($fd, -1));
7?>
8==DONE==
9--EXPECTF--
10Warning: ftruncate(): Negative size is not supported in %s%ebug71882.php on line %d
11bool(false)
12==DONE==
13