Movatterモバイル変換


[0]ホーム

URL:


PHP 8.5.0 Alpha 2 available for testing
    pow »
    « octdec

    pi

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

    piGet value of pi

    Description

    pi():float

    Returns an approximation of pi. Also, you can use theM_PI constant which yields identical results topi().

    Parameters

    This function has no parameters.

    Return Values

    The value of pi as float.

    Examples

    Example #1pi() example

    <?php
    echopi(),PHP_EOL;// 3.1415926535898
    echoM_PI,PHP_EOL;// 3.1415926535898
    ?>

    Found A Problem?

    Learn How To Improve This PageSubmit a Pull RequestReport a Bug
    add a note

    User Contributed Notes

    There are no user contributed notes for this page.
    To Top
    and to navigate •Enter to select •Esc to close
    PressEnter without selection to search using Google

    [8]ページ先頭

    ©2009-2025 Movatter.jp