PHP Infinity Is Reachable

no-email (Frederic Bouchery), Frederic Bouchery
Sun, 10 Sep 2023 00:00:00 +0000

Infinite values are sometimes returned by PHP functions, such as ``log(0)`` or ``exp(PHP_INT_MAX)``. In these cases, beware and do not compare it directly with an integer as a positive is considered bigger than infinite. It is recommended to use the function ``is_finite``.