xref: /PHP-5.5/ext/standard/tests/array/bug22463.phpt (revision b666d8c6)
1--TEST--
2Bug #22463 (array_reduce() segfaults)
3--FILE--
4<?php
5
6function a($ary) {
7	return (is_array($ary) ? array_reduce($ary, 'cb', 0) : 1);
8}
9
10function cb($v, $elem) {
11	return $v + a($elem);
12}
13
14$ary = array(
15	array(
16		array(
17			array(
18				array(
19					array(0, 1, 2, 3, 4)
20				)
21			)
22		)
23	)
24);
25
26var_dump(a($ary));
27?>
28--EXPECT--
29int(5)
30