---
title: "[Discussion] Revisiting typed closures"
url: https://daily.dev/posts/discussion-revisiting-typed-closures-jjfrcegoz
source_url: https://externals.io/message/131663
type: article
source: "externals.io"
published: 2026-07-01T17:27:19.386Z
updated: 2026-07-01T17:27:39.620Z
tags: ["php"]
reading_time: 4
upvotes: 0
comments: 0
language: 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.

# [Discussion] Revisiting typed closures

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

## Summary

A PHP internals mailing list discussion proposing typed closure signatures in PHP, e.g. `Closure(int, string): array`, enforced at type boundaries. The author revisits previously declined and draft RFCs (Callable Prototypes 2016, Structural Typing for Closures 2023, functional interfaces) and argues the feature would catch mismatched callbacks at the call site rather than deep inside operations or only via static analysis. One respondent suggests waiting for generics to make Closure a generic type instead; the author counters that typed closures are a smaller, independent feature that doesn't block or require generics.

## Full article

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

## Similar posts on daily.dev

- [\[Discussion\] Revisiting typed closures](https://daily.dev/posts/discussion-revisiting-typed-closures-m7bedp4aq) · externals.io · 0 upvotes · 0 comments
- [\[Discussion\] Revisiting typed closures](https://daily.dev/posts/discussion-revisiting-typed-closures-zsywfyl3j) · externals.io · 0 upvotes · 0 comments
- [\[Discussion\] Revisiting typed closures](https://daily.dev/posts/discussion-revisiting-typed-closures-zcsit47iw) · externals.io · 0 upvotes · 0 comments
- [\[Discussion\] Revisiting typed closures](https://daily.dev/posts/discussion-revisiting-typed-closures-alroynlgw) · externals.io · 0 upvotes · 0 comments
- [\[Discussion\] Revisiting typed closures](https://daily.dev/posts/discussion-revisiting-typed-closures-76red5hlb) · externals.io · 0 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php)

[View this post on daily.dev](https://daily.dev/posts/discussion-revisiting-typed-closures-jjfrcegoz)
