xref: /PHP-8.2/ext/standard/tests/array/bug35014.phpt (revision a9398056)
1--TEST--
2Bug #35014 (array_product() always returns 0) (32bit)
3--SKIPIF--
4<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
5--FILE--
6<?php
7$tests = array(
8    array(),
9    array(0),
10    array(3),
11    array(3, 3),
12    array(0.5, 2),
13    array(99999999, 99999999),
14    array(8.993, 7443241,988, sprintf("%u", -1)+0.44),
15    array(2,sprintf("%u", -1)),
16);
17
18foreach ($tests as $v) {
19    var_dump(array_product($v));
20}
21?>
22--EXPECT--
23int(1)
24int(0)
25int(3)
26int(9)
27float(1)
28float(9999999800000000)
29float(2.8404260053902914E+20)
30float(8589934590)
31