HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

tan

Description

The tan of Math for PHP tangent.

Syntax

tan(
    float $num
): float

Parameters

num

The argument to process in radians

Return

The tangent of num

Examples

1 · num · single

<?

$num = deg2rad(360);

$return = tan($num);

echo $return;
Array
(
    [0] => Array
        (
            [0] => a: 1
            [1] => b: 2
            [2] => c: 3
        )

    [name] => Array
        (
            [0] => a
            [1] => b
            [2] => c
        )

    [1] => Array
        (
            [0] => a
            [1] => b
            [2] => c
        )

    [digit] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

    [2] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

)

2 · num · multiple

<?

for($i = 0; $i <= 360; ++$i)
{
    $num = deg2rad($i);

    $return = tan($num);

    echo "$i: $return", PHP_EOL;
}
PREG_BACKTRACK_LIMIT_ERROR