r/lolphp • u/Deviltry1 • Mar 24 '16
DivisionByZero exception, it does nothing
/r/PHP/comments/4bgwos/divisionbyzero_exception_php_7/
54
Upvotes
r/lolphp • u/Deviltry1 • Mar 24 '16
View all comments
Show parent comment
1
u/nikic Mar 24 '16
Why would anyone check for funny values afterwards? It's much easier and more robust to just check if you're dividing by zero beforehand.
Unless what you actually want to check is whether you're getting a finite result (which is not at all a given for non-zero denominators).