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