Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP tan() Function

PHP tan() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Return the tangent of different numbers:

"); echo(tan(0.50) . "
"); echo(tan(-0.50) . "
"); echo(tan(5) . "
"); echo(tan(10) . "
"); echo(tan(-5) . "
"); echo(tan(-10)); ?>

Run Example »


Definition and Usage

The tan() function returns the tangent of a number.


Syntax

tan(

number

);

Parameters Description
number Required. Specifies a radian value.

Technical Details

Return Value: number The tangent of.
Return Type: Float
PHP Version: 4+

PHP Math Reference Manual PHP Math Reference Manual