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