sqrt

Square root

Syntax

sqrt ( float $arg ) : float

Parameters

arg

The argument to process

Return

The square root of arg or the special value NAN for negative numbers.

Examples

1

<?

$arg = 9;

$return = sqrt($arg);

echo $return;

?>
3

2

<?

$arg = -9;

$return = sqrt($arg);

echo $return;

?>
NAN

abs

acos

acosh

asin

asinh

atan

atan2

atanh

base_convert

bindec

ceil

cos

cosh

decbin

dechex

decoct

deg2rad

exp

expm1

fdiv

floor

fmod

hexdec

hypot

intdiv

is_finite

is_infinite

is_nan

log

log10

log1p

max

min

octdec

pi

pow

rad2deg

round

sin

sinh

tan

tanh

PHP

Home Menu