PHP cosh() Function

Definition and Usage

The cosh() function returns the hyperbolic cosine of a number.

Syntax

cosh(x)
Parameter Description
x Required. A number.

Description

Returns x The hyperbolic cosine value, defined as (exp(arg) + exp(-arg))/2.

Example

In this example, we will return the hyperbolic cosine of different numbers:

<?php
echo(cosh(3);
echo(cosh(-3);
echo(cosh(0);
echo(cosh(M_PI);
echo(cosh(2*M_PI));
?>

Output:

10.0676619958
10.0676619958
1
11.5919532755
267.746761484