Task

Write a function to detect a   divide by zero error   without checking if the denominator is zero.




 
function div ($a, $b) { 
    try{$a/$b}
    catch{"Bad parameters: `$a = $a and `$b = $b"}
}
div 10 2
div 1 0
 