PHP 7 sin() Function
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));
?>
Try it Yourself »
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