1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Files
archived-php-src/tests/lang/bug45392.phpt
T
Shivam Mathur ac15486ae0 Fix CI for windows-2022
This is a continuation of GH-18927 to fix CI for windows-2022
2025-06-25 03:20:49 +05:30

26 lines
548 B
PHP

--TEST--
Bug #45392 (ob_start()/ob_end_clean() and memory_limit)
--SKIPIF--
<?php
if (PHP_OS_FAMILY === 'Windows' && version_compare(PHP_VERSION, '8.4', '<')) {
die("xfail fails on Windows Server 2022 and newer.");
}
if (getenv("USE_ZEND_ALLOC") === "0") {
die("skip Zend MM disabled");
}
--FILE--
<?php
echo __LINE__ . "\n";
ini_set('memory_limit', "2M");
ob_start();
$i = 0;
while($i++ < 5000) {
echo str_repeat("may not be displayed ", 42);
}
ob_end_clean();
?>
--EXPECTF--
2
Fatal error: Allowed memory size of %d bytes exhausted%s