12
El bloque Try / Catch en PHP no detecta la excepción
Estoy tratando de ejecutar este Ejemplo # 1 desde esta página: 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"; } …
97
php