The sin() function Returns the sine of a number.
Syntax
sin(num)
Parameters
num − The number for which you want to Return the sine. A value in radians.
Return
The sin() function Returns the arc sine of a number.
Example
<?php echo(sin(0.50) . "<br>"); echo(sin(-0.90) . "<br>"); ?>
Output
0.4794255386042<br>-0.78332690962748<br>
Example
Let us see another example −
<?php echo(sin(0) . "<br>"); echo(sin(1) . "<br>"); echo(sin(-1) . "<br>"); echo(sin(2) . "<br>"); ?>
Output
0<br>0.8414709848079<br>-0.8414709848079<br>0.90929742682568<br>