catch multiple exception php
try
{
// Some code...
}
catch(AError | BError $e)
{
// Handle exceptions
}
catch(Exception $e)
{
// Handle the general case
}<?php
try {
/* ... */
} catch (FirstException $ex) {
$this->manageException($ex);
} catch (SecondException $ex) {
$this->manageException($ex);
}
?>
<------------------------- To --------------------->
<?php
try {
} catch (FirstException | SecondException $ex) {
$this->manageException($ex);
}
?>
Also in PHP:
- delete register option laravel 7
- download and install laveral
- client's ip address in php
- What was the old name of PHP?
- current date time in php from format
- create laravel project in laravel/laravel
- date function attributes in php
- date funciton
- array to string separated by comma php
- associative array php
- am and pm in php
- curl_multi_exec
- fetch value from json link in php
- am pm date format php
- array_search
- basic date php
- ata date format in php
- cusatom time format to timestamp php
- errorLevel php no warnings
- Get the full url of the page in php
- composer what to do get created laravel new project
- PHP text string contains character
- currency convertor in php
- clear cache terminal laravel