xref: /PHP-7.4/Zend/tests/bug67856.phpt (revision 0f5bad93)
1--TEST--
2Bug #67856 (Leak when using array_reduce with by-ref function)
3--FILE--
4<?php
5$array = [1, 2, 3];
6var_dump(array_reduce($array, function(&$a, &$b) {
7    return $a + $b;
8}, 0));
9?>
10--EXPECT--
11int(6)
12