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?> 9--FILE-- 10<?php 11echo __LINE__ . "\n"; 12ini_set('memory_limit', "2M"); 13ob_start(); 14$i = 0; 15while($i++ < 5000) { 16 echo str_repeat("may not be displayed ", 42); 17} 18ob_end_clean(); 19?> 20--EXPECTF-- 212 22 23Fatal error: Allowed memory size of %d bytes exhausted%s 24