function max php code example Example: php max echo max(2, 3, 1, 6, 7); // 7 echo max(array(2, 4, 5)); // 5