X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP tan() Function

PHP Math Reference PHP Math Reference

Example

Return the tangent of different numbers:

<?php
echo(tan(M_PI_4) . "<br>");
echo(tan(0.50) . "<br>");
echo(tan(-0.50) . "<br>");
echo(tan(5) . "<br>");
echo(tan(10) . "<br>");
echo(tan(-5) . "<br>");
echo(tan(-10));
?>

Run example »

Definition and Usage

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


Syntax

tan(number);

Parameter Description
number Required. Specifies a value in radians

Technical Details

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


PHP Math Reference PHP Math Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook