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

PHP sin() Function

PHP Math Reference PHP Math Reference

Example

Return the sine of different numbers:

<?php
echo(sin(3) . "<br>");
echo(sin(-3) . "<br>");
echo(sin(0) . "<br>");
echo(sin(M_PI) . "<br>");
echo(sin(M_PI_2));
?>

Run example »

Definition and Usage

The sin() function returns the sine of a number.


Syntax

sin(number);

Parameter Description
number Required. Specifies a value in radians

Technical Details

Return Value: The sine 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