English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

sin() Function in PHP

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

Syntax

sin(num)

parameter

  • num-the number to return the sine of. Radian value.

returns

Thissin()The function returns the arcsine of a number.

Example

<?php
   echo(sin(0.50)  .  ";
   echo(sin(-0.90)  .  ";
?>

Output Result

0.4794255386042<br>-0.78332690962748<br>

Example

Let's see another example-

<?php
   echo(sin(0)  .  ";
   echo(sin(1)  .  ";
   echo(sin(-1)  .  ";
   echo(sin(2)  .  ";
?>

Output Result

0<br>0.8414709848079<br>-0.8414709848079<br>0.90929742682568<br>