Is there something that's larger than any numbers in PHP?

前端 未结 9 1532
谎友^
谎友^ 2021-01-19 03:12

I need to simulate a ∞ in PHP.

So that min(∞,$number) is always $number.

9条回答
  •  北恋
    北恋 (楼主)
    2021-01-19 03:58

    Use the constant PHP_INT_MAX.

    http://php.net/manual/en/language.types.integer.php

提交回复
热议问题