Flowchart (ISO 5807)
Source code
PHP
function safeDiv($a, $b) {
try {
if ($b == 0) throw new Exception("нуль");
return $a / $b;
} catch (Exception $e) {
return 0;
}
}The editor opens with this code — change it and the chart redraws.
- Language
- PHP
- Constructs
- try / catch
- Topic
- Exceptions
- Formats
- Word, Visio, draw.io, PDF, SVG