Possible Duplicate:
How to catch a division by zero?
Aside from checking if the denominator is 0, are there other ways to check for a division of zero in php?
Possible Duplicate:
How to catch a division by zero?
Aside from checking if the denominator is 0, are there other ways to check for a division of zero in php?
No, there is no other way to check for division by 0 other than checking the denominator isn't 0 before attempting the division.
Why is checking the denominator first a problem? It's only 1 additional line of code.