[Calculation]= SQuare Root, square root

php sqrt() function syntax

Function: The function of sqrt() function is to find the square root of the parameters

Syntax: sqrt(X)

Parameters:

Parameter Description
XTo find the square root Number

Description: Returns the result of taking the square root of parameter X

php sqrt() function example

<?php
$i = 9;
$i = sqrt($i);
$j = 8;
$j = sqrt($j);
$k = -5;
$k = sqrt($k);
echo $i."*****".$j."*****".$k;
?>

Run instance»

Click the "Run instance" button to view the online instance

Output:

3*****2.8284271247462*****NAN