Latest web development tutorials
 

PHP cosh() Function

< PHP Math Reference

Example

Return the hyperbolic cosine of different numbers:

<?php
echo(cosh(3) . "<br>");
echo(cosh(-3) . "<br>");
echo(cosh(0) . "<br>");
echo(cosh(M_PI) . "<br>");
echo(cosh(2*M_PI));
?>
Run example »

Definition and Usage

The cosh() function returns the hyperbolic cosine of a number (equivalent to (exp(number) + exp(-number)) / 2).


Syntax

cosh(number);

Parameter Description
number Required. Specifies a number

Technical Details

Return Value: The hyperbolic cosine of number
Return Type: Float
PHP Version: 4.1+

< PHP Math Reference