php throw exception April 13, 2023 by wordlinkanswers php throw exception Comment 12 function inverse($x) {<br /> if (!$x) {<br /> throw new Exception(‘Division by zero.’);<br /> }<br /> return 1/$x;<br /> } Popularity 10/10 Helpfulness 10/10 Language php Source: www.php.net Tags: exception php throw Share Link to this answer Share Contributed on Feb 27 2020 Sal-versij 0 Answers Avg Quality 2/10 wordlinkanswers