Annotation of embedaddon/php/ext/standard/tests/array/bug35014_64bit.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #35014 (array_product() always returns 0) (64bit)
3: --SKIPIF--
4: <?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
5: --INI--
6: precision=14
7: --FILE--
8: <?php
9: $tests = array(
10: 'foo',
11: array(),
12: array(0),
13: array(3),
14: array(3, 3),
15: array(0.5, 2),
16: array(99999999, 99999999),
17: array(8.993, 7443241,988, sprintf("%u", -1)+0.44),
18: array(2,sprintf("%u", -1)),
19: );
20:
21: foreach ($tests as $v) {
22: var_dump(array_product($v));
23: }
24: ?>
25: --EXPECTF--
26: Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
27: NULL
28: int(1)
29: int(0)
30: int(3)
31: int(9)
32: float(1)
33: int(9999999800000001)
34: float(1.219953680145E+30)
35: float(3.6893488147419E+19)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>