Movatterモバイル変換


[0]ホーム

URL:


PHP 8.5.0 Alpha 2 available for testing
    is_nan »
    « is_finite

    is_infinite

    (PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)

    is_infiniteChecks whether a float is infinite

    Description

    is_infinite(float$num):bool

    Returns whether the givennum is eitherINF or -INF.

    Parameters

    num

    Thefloat to check

    Return Values

    true ifnum is eitherINF or -INF, elsefalse.

    Examples

    Example #1is_infinite() example

    <?php
    $inf
    =1e308*2;

    var_dump($inf,is_infinite($inf));

    $negative_inf= -$inf;

    var_dump($negative_inf,is_infinite($negative_inf));
    ?>

    The above example will output:

    float(INF)bool(true)float(-INF)bool(true)

    See Also

    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