The round() function rounds a floating-point number to its nearest integer.
<!DOCTYPE html> <html> <body> <?php echo "number 1 round : " . round(4.75); echo "<br/>"; echo "number 2 round : " . round(2.45); ?> </body> </html>
The PHP rand() function is used to generate a random number.
<!DOCTYPE html> <html> <body> <?php echo(rand()); ?> </body> </html>
The PHP sqrt() function use to square root of a number.
<!DOCTYPE html> <html> <body> <?php echo "Square root is : ".(sqrt(100)); ?> </body> </html>
Exercise: Other PHP math function list click here for see list.