Return the square roots of distinct numbers:
<?phpecho(sqrt(0) . "<br>");echo(sqrt(1) . "<br>");echo(sqrt(9) . "<br>");echo(sqrt(0.64) . "<br>");echo(sqrt(-9));?>The sqrt() function returns the square root of a number.
sqrt( number );
parameter | describe |
---|---|
number | Required. Specify a number. |
Return value: | Returns the square root of number , or NAN if number is negative. |
---|---|
Return type: | Float |
PHP version: | 4+ |