summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/bug76778.phpt
blob: 60f42b744d9ee49a4cb39d2c3b58f7639fc659aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Bug #76778 (array_reduce leaks memory if callback throws exception)
--FILE--
<?php
try {
    array_reduce(
        [1],
        function ($carry, $item) {
            throw new Exception;
        },
        range(1, 3)
    );
} catch (Exception $e) {
}
?>
===DONE===
--EXPECT--
===DONE===