<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-nnmk421vv" -->

---
title: [PRE-RFC] Deprecate returning from a finally block
description: A PHP internals pre-RFC discussion proposes deprecating `return` inside `finally` blocks. Currently, a `return` in a `finally` block silently discards any...
canonical: https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-nnmk421vv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: [PRE-RFC] Deprecate returning from a finally block | daily.dev
og:description: A PHP internals pre-RFC discussion proposes deprecating `return` inside `finally` blocks. Currently, a `return` in a `finally` block silently discards any...
og:url: https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-nnmk421vv
og:image: https://api.daily.dev/og/posts/nnmk421vV.png
og:image:alt: [PRE-RFC] Deprecate returning from a finally block
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# [PRE-RFC] Deprecate returning from a finally block

**[externals.io](https://daily.dev/sources/externals)** · 10 min read · 0 upvotes · 0 comments

## Summary

A PHP internals pre-RFC discussion proposes deprecating `return` inside `finally` blocks. Currently, a `return` in a `finally` block silently discards any pending exception or return value from the `try`/`catch` block, with no error or notice. This is inconsistent with PHP's handling of `break`, `continue`, and `goto` out of `finally`, which are already compile errors. The author implemented the deprecation and scanned the top ~5000 Composer packages, finding only 12 occurrences across 9 packages — 3 of which appear to be genuine latent bugs. C# is cited as a language that already prohibits `return` in `finally` blocks at compile time. Respondents including Gina P. Banyard and Larry Garfield expressed support, with Garfield suggesting it could be folded into the omnibus deprecations RFC rather than requiring its own RFC.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://externals.io/message/131411>

## Similar posts on daily.dev

- [\[PRE-RFC\] Deprecate returning from a finally block](https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-pprl4vo77) · externals.io · 0 upvotes · 0 comments
- [\[PRE-RFC\] Deprecate returning from a finally block](https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-v7kxxklnx) · externals.io · 0 upvotes · 0 comments
- [\[PRE-RFC\] Deprecate returning from a finally block](https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-mw01tahgg) · externals.io · 0 upvotes · 0 comments
- [\[PRE-RFC\] Deprecate returning from a finally block](https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-kmtxhue6u) · externals.io · 0 upvotes · 0 comments
- [\[PRE-RFC\] Deprecate returning from a finally block](https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-exty46hbf) · externals.io · 0 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#language-design](https://daily.dev/tags/language-design)

[View this post on daily.dev](https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-nnmk421vv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"[PRE-RFC] Deprecate returning from a finally block","url":"https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-nnmk421vv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-nnmk421vv"},"datePublished":"2026-06-19T16:43:59.314Z","dateModified":"2026-06-19T16:45:17.840Z","description":"A PHP internals pre-RFC discussion proposes deprecating `return` inside `finally` blocks. Currently, a `return` in a `finally` block silently discards any...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"externals.io","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"externals.io","logo":"https://media.daily.dev/image/upload/s--9i0zxASK--/f_auto,q_auto/v1780213616/logos/externals?_a=BAMAMiWQ0","url":"https://daily.dev/sources/externals"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/pre-rfc-deprecate-returning-from-a-finally-block-nnmk421vv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php,language-design","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"externals.io","item":"https://daily.dev/sources/externals"},{"@type":"ListItem","position":3,"name":"[PRE-RFC] Deprecate returning from a finally block"}]}
```

