Hi Am 2025-04-04 03:52, schrieb Yakov Lipkovich:
One thing I'm unsure of is what happens if an imported static function has the same name as a member function.
Larry already linked to the Pipe-Operator thread, which tries to solve something similar.
Nevertheless, I'd like to note that resolving this ambiguity between “method” and “free-standing function” is the most important part to solve *before* proposing UFCS and not just a small detail. Without that being resolved (or least without having an idea how to solve it), the UFCS proposal is just a “wishlist” entry and discussing wishlist entries without having an idea of how they are supposed work in practice is not particularly productive discourse. It's similar with generics, unless someone proposes a solution, just repeatedly stating that “PHP needs generics” is not bringing generics to the language.
Personally I have no idea how resolving the ambiguity would work, without making the uniform function call syntax non-uniform in practice.
Best regards Tim Düsterhus