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));
?>
Try it Yourself »

Definition and Usage

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


Syntax

cosh(number);

Parameter Values

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
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.