Return the square root of different numbers:
<?php
echo(sqrt(0) . "<br>");
echo(sqrt(1) . "<br>");
echo(sqrt(9) . "<br>");
echo(sqrt(0.64) . "<br>");
echo(sqrt(-9));
?>
Try it Yourself »
The sqrt() function returns the square root of a number.
sqrt(
number);
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return Value: | The square root of number, or NAN for negative numbers |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!