GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Downloads
  • Documentation
  • Get Involved
  • Help
  • Getting Started
  • Introduction
  • A simple tutorial
  • Language Reference
  • Basic syntax
  • Types
  • Variables
  • Constants
  • Expressions
  • Operators

This view

  • Original page
  • New address

GeezerVison is showing www.php.net — PHP: sin - Manual

PHP 8.6.0 RC5 available for testing
    sinh »
    « round
    • Preface
    • Function Reference
    • Mathematical Extensions
    • Math
    • Math Functions

    sin

    (PHP 4, PHP 5, PHP 7, PHP 8)

    sin — Sine

    Description

    function sin(float $num): float

    sin() returns the sine of the num parameter. The num parameter is in radians.

    Parameters

    num

    A value in radians

    Return Values

    The sine of num

    Examples

    Example #1 sin() example

    <?php
    // Precision depends on your precision directive
    echo sin(deg2rad(60)), PHP_EOL;  //  0.866025403 ...
    echo sin(60), PHP_EOL;           // -0.304810621 ...
    ?>

    See Also

    • asin() - Arc sine
    • sinh() - Hyperbolic sine
    • cos() - Cosine
    • tan() - Tangent
    • deg2rad() - Converts the number in degrees to the radian equivalent

    Found A Problem?

    Learn How To Improve This Page • Submit a Pull Request • Report a Bug
    +add a note

    User Contributed Notes

    There are no user contributed notes for this page.
    • Math Functions
      • abs
      • acos
      • acosh
      • asin
      • asinh
      • atan
      • atan2
      • atanh
      • base_​convert
      • bindec
      • ceil
      • clamp
      • cos
      • cosh
      • decbin
      • dechex
      • decoct
      • deg2rad
      • exp
      • expm1
      • fdiv
      • floor
      • fmod
      • fpow
      • hexdec
      • hypot
      • intdiv
      • is_​finite
      • is_​infinite
      • is_​nan
      • log
      • log10
      • log1p
      • max
      • min
      • octdec
      • pi
      • pow
      • rad2deg
      • round
      • sin
      • sinh
      • sqrt
      • tan
      • tanh
    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.