<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/rfc-primary-constructors-swsors3g5" -->

---
title: [RFC] Primary Constructors | daily.dev
description: A PHP internals mailing list thread discussing a new RFC for Primary Constructors in PHP. The RFC proposes a syntax allowing class properties to be declared...
canonical: https://daily.dev/posts/rfc-primary-constructors-swsors3g5
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: [RFC] Primary Constructors | daily.dev
og:description: A PHP internals mailing list thread discussing a new RFC for Primary Constructors in PHP. The RFC proposes a syntax allowing class properties to be declared...
og:url: https://daily.dev/posts/rfc-primary-constructors-swsors3g5
og:image: https://api.daily.dev/og/posts/SwsORS3G5.png
og:image:alt: [RFC] Primary Constructors
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.

# [RFC] Primary Constructors

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

## Summary

A PHP internals mailing list thread discussing a new RFC for Primary Constructors in PHP. The RFC proposes a syntax allowing class properties to be declared directly in the class signature (e.g., `class Money(public readonly int $amount) {}`), similar to Kotlin or C# primary constructors. Key debate points include: whether primary constructor bodies should be supported (the RFC excludes them), how the feature interacts with readonly classes and property hooks, compatibility with anonymous classes (deferred to future scope), and whether the limited scope of the feature justifies adding new syntax. The RFC author argues 30-70% of real-world constructors could benefit even without bodies, while critics argue the lack of body support makes the feature too limited and forces refactoring to conventional constructors as soon as non-trivial logic is needed.

## Full article

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

## Similar posts on daily.dev

- [\[RFC\] Primary Constructors](https://daily.dev/posts/rfc-primary-constructors-ab2xdw2ck) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Primary Constructors](https://daily.dev/posts/rfc-primary-constructors-gsn81azwc) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Primary Constructors](https://daily.dev/posts/rfc-primary-constructors-oyt14zdsq) · externals.io · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/rfc-primary-constructors-swsors3g5)

```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":"[RFC] Primary Constructors","url":"https://daily.dev/posts/rfc-primary-constructors-swsors3g5","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/rfc-primary-constructors-swsors3g5"},"datePublished":"2026-06-29T19:12:46.484Z","dateModified":"2026-06-29T19:13:20.881Z","description":"A PHP internals mailing list thread discussing a new RFC for Primary Constructors in PHP. The RFC proposes a syntax allowing class properties to be declared...","image":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","thumbnailUrl":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","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/rfc-primary-constructors-swsors3g5","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,php","timeRequired":"PT25M"}
{"@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":"[RFC] Primary Constructors"}]}
```

