Hi Ilija,

Am 04.11.2022 um 15:25 schrieb Ilija Tovilo:
Please let me know if you have any thoughts.

Ilija

That new way of accessing class constants dynamically does not really make things more readable for me. Maybe I just need to get used to it, but especially that last example would make my head spin without additional comments:

Foo::{test('foo')}::{test('bar')}; Maybe I miss the use case. What kind of code would benefit from this? Wouldn't just using constant() for dynamically built constant strings be more legible? Maybe in a separate line? In the past I used a lot of flag constants backed by integers. A lot of these use cases have become classes/types in their own right since. When do you use these constants? Just my thoughts.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to