1.2.662. Manipulates INF¶
<?php
// pow returns INF, as it is equivalent to 1 / 0 ^ 2
$a = pow(0,-2); //
// exp returns an actual value, but won't be able to represent it as a float
$a = exp(PHP_INT_MAX);
// 0 ^ -1 is like 1 / 0 but returns INF.
$a = pow(0, -1);
var_dump(is_infinite($a));
// This yields a Division by zero exception
$a = 1 / 0;
?>
See also Math predefined constants.
1.2.662.1. Specs¶
Short name |
Php/IsINF |
Rulesets |
|
Exakat since |
0.10.6 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
High |
Features |
class, interface |
Available in |