PHP cosh()Functions

PHP Math 参考手册PHP Math Reference Manual

Examples

Returns 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));
?>

Run example »

Definition and Usage

The cosh() function returns the hyperbolic cosine of a number, defined as ((exp(number) + exp(-number))/2).


Syntax

cosh(number);

Parameter Description
number Required. Specifies a number.

Technical Details

Return value: numberThe hyperbolic cosine of.
Return type: Float
PHP version: 4.1+


PHP Math 参考手册PHP Math Reference Manual Other Extensions