Re: [RFC] Strict Namespace Resolution
| From: | Rowan Tommins [IMSoP] | Date: | Wed, 15 Jul 2026 17:18:28 +0000 |
| Subject: | Re: [RFC] Strict Namespace Resolution | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131941@lists.php.net to get a copy of this message | ||
On 15 July 2026 16:54:04 BST, Ilija Tovilo <tovilo.ilija@gmail.com> 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]