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 itself. The RFC (now at v0.2) scopes out array/dim writes after community feedback flagged silent no-op concerns, and focuses solely on object property writes. The author intends to open a formal vote targeting PHP 8.6 with a 2/3 majority requirement.

10m read timeFrom externals.io
Post cover image
152 Impressions