Example 1 — Basic acosh() usage
This example calls acosh() with a few valid inputs and rounds the answers to 4 decimals.
<?php
echo acosh(1) . PHP_EOL;
echo round(acosh(2), 4) . PHP_EOL;
echo round(acosh(10), 4) . PHP_EOL; How It Works
- acosh(1) is exactly 0, because cosh(0) equals 1.
- acosh(2) is about 1.3169578969, and round(..., 4) gives 1.317.
- PHP drops the trailing zero, so 1.3170 is printed as 1.317.
- acosh(10) is about 2.9932, which grows slowly as the input grows.

