PHP min( ) Function Last Updated : 22 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The min() function of PHP is used to find the lowest value in an array, or the lowest value of several specified values. The min() function can take an array or several numbers as an argument and return the numerically minimum value among the passed parameters. The return type is not fixed, it can be an integer value or a float value based on input. Syntax: min(array_values) or min(value1, value2, ...) Parameters: This function accepts two different types of parameters which are explained below: array_values : It specifies an array containing the values. value1, value2, ... : It specifies two or more than two values to be compared. Return Value: The min() function returns the numerically minimum value. Examples: Input : min(12, 4, 62, 97, 26) Output : 4 Input : min(array(28, 36, 87, 12)) Output : 12 Below programs illustrate the working of min() in PHP: Program 1: PHP <?php echo (min(12, 4, 62, 97, 26)); ?> Output: 4 Program 2: PHP <?php echo (min(array(28, 36, 87, 12))); ?> Output: 12 Important points to note : min() function is used to find the numerically minimum number. min() function can be used on two or more than two values or it can be used on an array. The value returned is of mixed data type. Reference: http://php.net/manual/en/function.min.php Comment More infoAdvertise with us Next Article PHP min( ) Function S Shubrodeep Banerjee Follow Improve Article Tags : Misc Web Technologies PHP PHP-array PHP-function +1 More Practice Tags : Misc Similar Reads PHP max() Function The max() function is an inbuilt function in PHP, used to find the numerically maximum value in an array or the numerically maximum value of several specified values. Syntaxmax(array_values) or max(value1, value2, ...)ParametersThis function accepts two different types of arguments which are explain 2 min read PHP | mktime() Function The mktime() function is an inbuilt function in PHP which is used to return the Unix timestamp for a date. The timestamp returns a long integer containing the number of seconds between the Unix Epoch (January 1, 1970, 00:00:00 GMT) and the time specified. The hour, minute, second, month, day and yea 2 min read PHP list() Function The list() function is an inbuilt function in PHP which is used to assign array values to multiple variables at a time. This function will only work on numerical arrays. When the array is assigned to multiple values, then the first element in the array is assigned to the first variable, second to th 2 min read PHP next() Function The next() function is an inbuilt function in PHP and does the following operations: It is used to return the value of the next element in an array which the internal pointer is currently pointing to. We can know the current element by current function. The next() function increments the internal po 2 min read PHP | Functions A function in PHP is a self-contained block of code that performs a specific task. It can accept inputs (parameters), execute a set of statements, and optionally return a value. PHP functions allow code reusability by encapsulating a block of code to perform specific tasks.Functions can accept param 8 min read Like