1--TEST--
2Test array_product() function : variation
3--FILE--
4<?php
5echo "*** Testing array_product() : variations - negative numbers***\n";
6
7echo "\n-- Testing array_product() function with one negative number --\n";
8var_dump( array_product(array(-2)) );
9
10echo "\n-- Testing array_product() function with two negative numbers --\n";
11var_dump( array_product(array(-2, -3)) );
12
13echo "\n-- Testing array_product() function with three negative numbers --\n";
14var_dump( array_product(array(-2, -3, -4)) );
15
16echo "\n-- Testing array_product() function with negative floats --\n";
17var_dump( array_product(array(-1.5)));
18
19echo "\n-- Testing array_product() function with negative floats --\n";
20var_dump( array_product(array(-99999999.9, 99999999.1)));
21
22
23?>
24--EXPECT--
25*** Testing array_product() : variations - negative numbers***
26
27-- Testing array_product() function with one negative number --
28int(-2)
29
30-- Testing array_product() function with two negative numbers --
31int(6)
32
33-- Testing array_product() function with three negative numbers --
34int(-24)
35
36-- Testing array_product() function with negative floats --
37float(-1.5)
38
39-- Testing array_product() function with negative floats --
40float(-9999999900000000)
41