PHP Infinity Is ReachableΒΆ

By Frederic Bouchery

Infinite values are sometimes provided by PHP functions, such as log(0) or exp(PHP_INT_MAX). In that case, beware and do not compare it directly with an integer as a positive is considered bigger than infinite.

../_images/infinite_is_reachable.png