1--TEST--
2Test array_product() function : variation
3--FILE--
4<?php
5/* Prototype  : mixed array_product(array input)
6 * Description: Returns the product of the array entries
7 * Source code: ext/standard/array.c
8 * Alias to functions:
9 */
10
11echo "*** Testing array_product() : variations - negative numbers***\n";
12
13echo "\n-- Testing array_product() function with one negative number --\n";
14var_dump( array_product(array(-2)) );
15
16echo "\n-- Testing array_product() function with two negative numbers --\n";
17var_dump( array_product(array(-2, -3)) );
18
19echo "\n-- Testing array_product() function with three negative numbers --\n";
20var_dump( array_product(array(-2, -3, -4)) );
21
22echo "\n-- Testing array_product() function with negative floats --\n";
23var_dump( array_product(array(-1.5)));
24
25echo "\n-- Testing array_product() function with negative floats --\n";
26var_dump( array_product(array(-99999999.9, 99999999.1)));
27
28
29?>
30===DONE===
31--EXPECTF--
32*** Testing array_product() : variations - negative numbers***
33
34-- Testing array_product() function with one negative number --
35int(-2)
36
37-- Testing array_product() function with two negative numbers --
38int(6)
39
40-- Testing array_product() function with three negative numbers --
41int(-24)
42
43-- Testing array_product() function with negative floats --
44float(-1.5)
45
46-- Testing array_product() function with negative floats --
47float(-9.9999999E+15)
48===DONE===