cvs: php4 /ext/standard/tests/array bug22463.phpt
| From: | Moriyoshi Koizumi | Date: | Sun, 11 May 2003 02:37:17 +0000 |
| Subject: | cvs: php4 /ext/standard/tests/array bug22463.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20825@lists.php.net to get a copy of this message | ||
moriyoshi Sat May 10 22:37:17 2003 EDT
Added files:
/php4/ext/standard/tests/array bug22463.phpt
Log:
Added test case for bug #22463
Index: php4/ext/standard/tests/array/bug22463.phpt
+++ php4/ext/standard/tests/array/bug22463.phpt
--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)