---
title: "[php-src] PR #20903: GH-10497 (const obj->prop write)"
url: https://daily.dev/posts/php-src-pr-20903-gh-10497-const-obj--prop-write--fkzzdixhj
source_url: https://externals.io/message/131441
type: article
source: "externals.io"
published: 2026-06-21T20:14:16.147Z
updated: 2026-06-21T20:14:37.661Z
tags: ["php"]
reading_time: 11
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.

# [php-src] PR #20903: GH-10497 (const obj->prop write)

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

## Summary

A PHP internals mailing list thread discussing PR #20903 and the associated RFC `const_object_property_write`, which proposes allowing property writes on objects referenced by PHP constants. Currently, `CONST_OBJ->prop = value` throws a 'Cannot use temporary expression in write context' error, even though the operation mutates the object rather than the constant binding. The RFC (v0.2) scopes the change to object property writes only, explicitly excluding array/dim writes after feedback from Tim Düsterhus and Ilija Tovilo. Key concerns raised include silent no-op behavior when writing to temporary const values (e.g., array constants), and whether class constants should be treated consistently with global constants. The author intends to open a formal vote targeting PHP 8.6 on June 29, 2026, requiring a 2/3 majority.

## Full article

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

## Similar posts on daily.dev

- [\[php-src\] PR \#20903: GH-10497 \(const obj->prop write\)](https://daily.dev/posts/php-src-pr-20903-gh-10497-const-obj--prop-write--64tqzplah) · externals.io · 0 upvotes · 0 comments
- [\[php-src\] PR \#20903: GH-10497 \(const obj->prop write\)](https://daily.dev/posts/php-src-pr-20903-gh-10497-const-obj--prop-write--76rbjhmjl) · externals.io · 0 upvotes · 0 comments
- [\[php-src\] PR \#20903: GH-10497 \(const obj->prop write\)](https://daily.dev/posts/php-src-pr-20903-gh-10497-const-obj--prop-write--1ouy4eieo) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Readonly Property Defaults](https://daily.dev/posts/rfc-readonly-property-defaults-wdsrbpxad) · externals.io · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/php-src-pr-20903-gh-10497-const-obj--prop-write--fkzzdixhj)
