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