PHP cosh()
Published Jun 21, 2023
Contribute to Docs
The cosh() function in PHP returns the hyperbolic cosine of a number. It calculates the value using the exponential function and is useful in various mathematical calculations.
Syntax
$result = cosh(number);
number: Represents the input value for which the hyperbolic cosine will be returned.
Example
In the following example the cosh() is used to return the hyperbolic cosine of 2.5:
<?phpecho(cosh(2.5));?>
The output will be:
6.1322894796637
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn PHP on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours