Return the square root of different numbers in PHP

Description

The following code shows how to return the square root of different numbers.

Example


  //from   w  ww  . j a  va 2  s. co  m
<?php
    echo(sqrt(0) . "<br>");
    echo(sqrt(1) . "<br>");
    echo(sqrt(9) . "<br>");
    echo(sqrt(0.64) . "<br>");
    echo(sqrt(-9));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions