1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 01:48:26 +02:00
Commit Graph

1 Commits

Author SHA1 Message Date
Pierrick Charron 0aed2cc2a4 Allow catching multiple exception types in a single catch statement
This commit add the possibility to catch multiple exception types in
a single catch statement to avoid code duplication.

try {
	   // Some code...
} catch (ExceptionType1 | ExceptionType2 $e) {
	   // Code to handle the exception
} catch (\Exception $e) {
	   // ...
}
2016-05-01 18:47:08 -04:00