Php is infinite
From w3cyberlearnings
Contents |
PHP function is_infinite
This function checks whether a number is without any limit (infinite).
Syntax is_infinite
is_infinite()
Return
It returns true (1) when the number is infinite and it returns nothing when the number is finite.
Example 1
<?php echo "check 1:"; echo is_infinite(1/3); echo "<br/>"; echo "check 2:"; echo is_infinite(log1p(3)); echo "<br/>"; echo "check 3:"; echo is_infinite(log(0)); echo "<br/>"; ?>
Output
check 1: check 2: check 3:1