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() : variation - using non numeric values ***\n";
12
13class A {
14  static function help() { echo "hello\n"; }
15}
16$fp = fopen(__FILE__, "r");
17
18$types = array("boolean (true)" => true, "boolean (false)" => false,
19       "string" => "hello", "numeric string" =>  "12",
20       "resource" => $fp, "object" => new A(), "null" => null,
21       "array" => array(3,2));
22
23foreach ($types as $desc => $type) {
24  echo $desc . "\n";
25  var_dump(array_product(array($type)));
26  echo "\n";
27}
28
29fclose($fp);
30?>
31===DONE===
32--EXPECTF--
33*** Testing array_product() : variation - using non numeric values ***
34boolean (true)
35int(1)
36
37boolean (false)
38int(0)
39
40string
41int(0)
42
43numeric string
44int(12)
45
46resource
47int(%d)
48
49object
50int(1)
51
52null
53int(0)
54
55array
56int(1)
57
58===DONE===