Re: [PHP-DEV] [RFC] Strict Namespace Resolution

[email protected] ("Rowan Tommins [IMSoP]") Wed, 15 Jul 2026 18:18:28 +0100
Newsgroups php.internals
Message-ID <[email protected]>
On 15 July 2026 16:54:04 BST, Ilija Tovilo <[email protected]> wrote:
>This flag forces the use of a \ prefix, but it's worth noting there are some communities (e.g. Laravel and Symfony) who have explicitly rejected the idea of prefixing all functions for readability reasons.

I know it won't change anyone's mind, but for the record, I've always found this baffling. Adding a single punctuation mark next to function calls seems far more readable to me than having a huge block of "use function" lines at the top of every file.

The often-suggested "scalar methods" would add more punctuation than moving to "no global fallback" - "\strlen($foo)" vs "$foo->length()".


Rowan Tommins
[IMSoP]