# ZEND_ACC_* flags

- Thread: https://externals.io/message/102970
- Original archive: https://news-web.php.net/php.internals/102970
- Started by Dmitry Stogov on 2018-07-25T15:01:37+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #102970 — Dmitry Stogov — 2018-07-25T15:01:37+00:00

URL: https://externals.io/message/102970#102970

Hi,


I tried to  fix ZEND_ACC_* flags mess.


https://gist.github.com/dstogov/3b6ae377c17524b219670960cf98f8c1


The patch specifies flags meaning, and reorder them according to meaning and frequency of usage (this allows generation of shorter instructions on x86).

Unfortunately, the patch breaks few reflection based tests that relay on binary modifiers values.


Do you think, it it's OK to commit thin into 7.3 or better to wait for branching?


Thanks. Dmitry.

---

## #102971 — Marco Pivetta — 2018-07-25T18:27:49+00:00

URL: https://externals.io/message/102970#102971 · In reply to: #102970

This can potentially break some cached flags somewhere, and is a BC break:
any rationale behind the change?



> Hi,
>
>
> I tried to  fix ZEND_ACC_* flags mess.
>
>
> https://gist.github.com/dstogov/3b6ae377c17524b219670960cf98f8c1
>
>
> The patch specifies flags meaning, and reorder them according to meaning
> and frequency of usage (this allows generation of shorter instructions on
> x86).
>
> Unfortunately, the patch breaks few reflection based tests that relay on
> binary modifiers values.
>
>
> Do you think, it it's OK to commit thin into 7.3 or better to wait for
> branching?
>
>
> Thanks. Dmitry.

---

## #102973 — Dmitry Stogov — 2018-07-25T20:09:44+00:00

URL: https://externals.io/message/102970#102973

OK. I'll keep this for next PHP version.

There is no any performance improvement (just a bit smaller code).


The patch clarifies the meaning of all the flags, what entities use them, and points what some of them may be eliminated completely.


Thanks. Dmitry.

---

## #102974 — Sara Golemon — 2018-07-25T22:24:45+00:00

URL: https://externals.io/message/102970#102974 · In reply to: #102970

>
> I tried to  fix ZEND_ACC_* flags mess.
>
> https://gist.github.com/dstogov/3b6ae377c17524b219670960cf98f8c1
>
>
> The patch specifies flags meaning, and reorder them according to meaning and frequency of usage (this allows generation of shorter instructions on x86).
> Unfortunately, the patch breaks few reflection based tests that relay on binary modifiers values.
>
Documentation part: LOVE 💖 LOVE 💖 LOVE

Renumbering part: Eh, could save that for 8.0, but I won't complain
about it in 7.4.  Whichever version it lands in, please make a bump to
ZEND_MODULE_API_NO part of the commit, and a comment in
UPGRADING.INTERNALS as well.

-Sara
