PHP finally Keyword

PHP Keywords : Run some code regardless of whether an exception was thrown

Definition and Usage

The finally keyword is used in try...finally and try...catch...finally structures to run a block of code whether or not an exception occurred.

Related Pages

The throw keyword.

The catch keyword.

The finally keyword.

Read more about exceptions in our PHP Exceptions Tutorial.

❮ PHP Keywords