PHP - cosh() Function
The PHP cosh() function is used to return hyperbolic cosine of a value. The hyperbolic cosine of x is defined as:
where e is an Euler's number.
Syntax
cosh(number)
Parameters
number |
Required. Specify the value. |
Return Value
Returns the hyperbolic cosine of a value.
Example:
In the below example, cosh() function is used to find out the hyperbolic cosine of a value.
<?php echo cosh(0)."\n"; echo cosh(2)."\n"; echo cosh(4)."\n"; ?>
The output of the above code will be:
1 3.7621956910836 27.308232836016
❮ PHP Math Functions