Square Root in PHP Example. A Php program to print the number using sqrt function. In this program we can print the number using sqrt function. To find the square root of a given number, use the sqrt() function. This function, like pow(), rand(), and is nan(), is a built-in Math function in PHP. One of the math and trigonometry functions is the SQRT function. It’s used to calculate a number’s square root.

<?php

echo (sqrt(32)."<br/>");

echo (sqrt(64)."<br/>");

echo (sqrt(19)."<br/>");

?>

Output:

5.6568542494924

8

4.3588989435407

## Square Root Function in PHP

In mathematics, a square root is a factor of a number that, when multiplied by itself, yields the original value. A number’s square root is a number that, when multiplied by itself, equals the required value. Squares are the numbers that result from multiplying a value by itself. Whereas the square root of an integer is a value that when multiplied by itself yields the original value.

## Echo in PHP

echo is a statement that displays the output of a command. echo() and echo can be used with or without parentheses. echo does not produce a result. In echo, multiple strings can be separated by a comma (,).