Example 1 — Basic cosh() usage
This example prints the hyperbolic cosine of several numbers.
<?php
echo cosh(0) . PHP_EOL;
echo round(cosh(1), 4) . PHP_EOL;
echo round(cosh(2), 4) . PHP_EOL;
echo round(cosh(3), 4) . PHP_EOL; How It Works
- cosh(0) is exactly 1, which is the smallest possible value.
- cosh(1) is about 1.5431.
- cosh(2) is about 3.7622, so the values climb quickly.
- cosh(3) is already above 10, which shows the very fast growth.

