summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/bug22463.phpt
blob: 7993ac2576a08cac04915b0589da9ada6b9bb29e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--TEST--
Bug #22463 (array_reduce() segfaults)
--FILE--
<?php

function a($ary) {
	return (is_array($ary) ? array_reduce($ary, 'cb', 0) : 1);
}

function cb($v, $elem) {
	return $v + a($elem);
}

$ary = array(
	array(
		array(
			array(
				array(
					array(0, 1, 2, 3, 4)
				)
			)
		)
	)
);

var_dump(a($ary));
?>
--EXPECT--
int(5)