12
Спроба / зловити блок у PHP не ловить виняток
Я намагаюся запустити цей Приклад №1 із цієї сторінки: http://php.net/manual/en/language.exceptions.php <?php function inverse($x) { if (!$x) { throw new Exception('Division by zero.'); } return 1/$x; } try { echo inverse(5) . "\n"; echo inverse(0) . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } // Continue …
97
php