Skip to content

Instantly share code, notes, and snippets.

@MarioBlazek
Created December 9, 2019 12:56
Show Gist options
  • Save MarioBlazek/d772e47a94e9064bc59517c94484cd80 to your computer and use it in GitHub Desktop.
Save MarioBlazek/d772e47a94e9064bc59517c94484cd80 to your computer and use it in GitHub Desktop.
// exceptions.php
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
try {
throw new NotFoundHttpException();
} catch (\Exception $e) { echo 1;
} catch (NotFoundHttpException $e) { echo 2;
} catch (\Exception $e) { echo 3;
} finally { echo 4;
}
echo 5;
1. 245 2. 145 3. 12345 4. 25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment