PHP sinh() Function
The PHP sinh() function returns hyperbolic sine of a value. The hyperbolic sine of x is defined as:
where e is an Euler's number.
In special cases it returns the following:
- If the argument is NAN, then the result is NAN.
- If the argument is infinite, then the result is an infinity with the same sign as the argument.
Syntax
sinh(number)
Parameters
number |
Required. Specify the value. |
Return Value
Returns the hyperbolic sine of a value.
Example:
In the example below, sinh() function is used to find out the hyperbolic sine of a value.
<?php echo "sinh(-2) = ".sinh(-2)."\n"; echo "sinh(-1) = ".sinh(-1)."\n"; echo "sinh(0) = ".sinh(0)."\n"; echo "sinh(1) = ".sinh(1)."\n"; echo "sinh(2) = ".sinh(2)."\n"; echo "sinh(INF) = ".sinh(INF)."\n"; echo "sinh(-INF) = ".sinh(-INF)."\n"; echo "sinh(NAN) = ".sinh(NAN)."\n"; ?>
The output of the above code will be:
sinh(-2) = -3.626860407847 sinh(-1) = -1.1752011936438 sinh(0) = 0 sinh(1) = 1.1752011936438 sinh(2) = 3.626860407847 sinh(INF) = INF sinh(-INF) = -INF sinh(NAN) = NAN
❮ PHP Math Reference