PHP has a set of built-in math functions that allow you to perform mathematical tasks on numbers easily.
The min() and max() functions can be used to find the lowest or highest value in a list of arguments.
<?php echo "The max is: " . max(0, 150, 30, 20, -8, -200) . "\n"; echo "The min is: " . min(0, 150, 30, 20, -8, -200); ?>
round() and abs()round() function rounds a floating-point number to its nearest integer.abs() function returns the absolute (positive) value of a number.The rand() function generates a random number. If you want a random integer between a specific range, you can pass parameters to the function.
<?php // Generate a random number between 10 and 100 echo rand(10, 100); ?>