1--TEST--
2Test variations in usage of min()
3--FILE--
4<?php
5/*
6 * Function is implemented in ext/standard/array.c
7*/
8
9echo "\n*** Testing arrays  ***\n";
10
11var_dump(min(array(2,1,2)));
12var_dump(min(array(-2,1,2)));
13var_dump(min(array(2.1,2.11,2.09)));
14var_dump(min(array("", "t", "b")));
15var_dump(min(array(false, true, false)));
16var_dump(min(array(true, false, true)));
17var_dump(min(array(1, true, false, true)));
18var_dump(min(array(0, true, false, true)));
19var_dump(min(array(0, 1, array(2,3))));
20var_dump(min(array(2147483645, 2147483646)));
21var_dump(min(array(2147483647, 2147483648)));
22var_dump(min(array(2147483646, 2147483648)));
23var_dump(min(array(-2147483647, -2147483646)));
24var_dump(min(array(-2147483648, -2147483647)));
25var_dump(min(array(-2147483649, -2147483647)));
26
27echo "\nDone\n";
28
29?>
30--EXPECTF--
31*** Testing arrays  ***
32int(1)
33int(-2)
34float(2.09)
35string(0) ""
36bool(false)
37bool(false)
38bool(false)
39int(0)
40int(0)
41int(2147483645)
42int(2147483647)
43int(2147483646)
44int(-2147483647)
45%s(-2147483648)
46%s(-2147483649)
47
48Done
49