xref: /PHP-7.3/tests/lang/bug45392.phpt (revision 782352c5)
1--TEST--
2Bug #45392 (ob_start()/ob_end_clean() and memory_limit)
3--INI--
4display_errors=stderr
5--SKIPIF--
6<?php
7if (getenv("USE_ZEND_ALLOC") === "0") {
8    die("skip Zend MM disabled");
9}
10--FILE--
11<?php
12echo __LINE__ . "\n";
13ini_set('memory_limit', 100);
14ob_start();
15$i = 0;
16while($i++ < 5000)  {
17  echo str_repeat("may not be displayed ", 42);
18}
19ob_end_clean();
20?>
21--EXPECTF--
222
23Fatal error: Allowed memory size of %d bytes exhausted%s
24