Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php throw exception

function inverse($x) {
    if (!$x) {
        throw new Exception('Division by zero.');
    }
    return 1/$x;
}
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #throw #exception
ADD COMMENT
Topic
Name
3+6 =