# Asymmetric Property Write Performance

- Thread: https://staging.externals.io/message/131876
- Original archive: https://news-web.php.net/php.internals/131876
- Started by Holly Schilling on 2026-07-12T23:29:27+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://staging.externals.io/search.md?q={query} · RFCs at https://staging.externals.io/rfc.md · JSON API at https://staging.externals.io/api · documentation at https://staging.externals.io/llms.txt

---

## #131876 — Holly Schilling — 2026-07-12T23:29:27+00:00

URL: https://staging.externals.io/message/131876#131876

While digging into the code recently, I found a performance penalty for asymmetric property setters that are not public. In testing, I found that `protected` and `private` setters were roughly 4x slower than their `public` counterparts.

Code speaks louder than words, so I drafted a PR that removes the performance penalty. The Summary talks about the implementation details more in depth and how to verify the performance. The change is +226/-65 LOC, so fairly small. It might be worth trying to put this fix into 8.6 yet.

https://github.com/php/php-src/pull/22709

Holly

---

## #131917 — Holly Schilling — 2026-07-14T15:46:34+00:00

URL: https://staging.externals.io/message/131876#131917 · In reply to: #131876

This didn’t get much attention on the list, but Ilija was kind enough to review my Draft PR.

I think this is a good candidate to get into 8.6 yet. I posted a formal RFC for it. I’ll give it a few days for anyone who wants to weigh in on if this should land in 8.6 or wait until the next release.

RFC: https://wiki.php.net/rfc/direction_aware_property_resolution
PR: https://github.com/php/php-src/pull/22709

Holly

---

## #131937 — Ilia — 2026-07-15T13:23:37+00:00

URL: https://staging.externals.io/message/131876#131937 · In reply to: #131876

Looks like a great change, definitely a strong candidate for PHP 8.6
inclusion.

On Sun, Jul 12, 2026 at 7:32 PM Holly Schilling <
holly.a.schilling@outlook.com> wrote:

> While digging into the code recently, I found a performance penalty for
> asymmetric property setters that are not public. In testing, I found that
> `protected` and `private` setters were roughly 4x slower than their
> `public` counterparts.
>
> Code speaks louder than words, so I drafted a PR that removes the
> performance penalty. The Summary talks about the implementation details
> more in depth and how to verify the performance. The change is +226/-65
> LOC, so fairly small. It might be worth trying to put this fix into 8.6 yet.
>
> https://github.com/php/php-src/pull/22709
>
> Holly
>


-- 
Ilia Alshanetsky
Technologist, CTO, Entrepreneur
E: ilia@ilia.ws
T: @iliaa
B: http://ilia.ws
