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

PHP sin() Function

PHP sin() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Return the sine of different numbers:

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

Run Example »


Definition and Usage

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


Syntax

sin(

number

);

Parameters Description
number Required. Specifies a radian value.

Technical Details

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

PHP Math Reference Manual PHP Math Reference Manual