1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 03:22:58 +02:00

Merge branch 'PHP-7.3'

* PHP-7.3:
  Simplify regression test
This commit is contained in:
Christoph M. Becker
2018-08-23 12:52:31 +02:00

View File

@@ -1,24 +1,16 @@
--TEST--
Bug #76778 (array_reduce leaks memory if callback throws exception)
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die('skip slow test');
?>
--INI--
memory_limit=128M
--FILE--
<?php
for ($i = 0; $i < 100; $i++) {
try {
array_reduce(
[1],
function ($carry, $item) {
throw new Exception;
},
range(1, 200000)
);
} catch (Exception $e) {
}
try {
array_reduce(
[1],
function ($carry, $item) {
throw new Exception;
},
range(1, 3)
);
} catch (Exception $e) {
}
?>
===DONE===