catch multiple exception php

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);
}
?>
Source

Also in PHP: