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