catch multiple errors php code example
Example: multi catch for try php
<?php
try {
/* ... */
} catch (FirstException $ex) {
$this->manageException($ex);
} catch (SecondException $ex) {
$this->manageException($ex);
}
?>
<------------------------- To --------------------->
<?php
try {
} catch (FirstException | SecondException $ex) {
$this->manageException($ex);
}
?>