Am 23.08.2024 um 11:34 schrieb Nick Lockheart <li...@ageofdream.com>: > I think we are all trying to achieve the same thing here.
I'm not sure who "we" and what "same thing" here exactly is. I recall the following arguments for changing the current situation about function look ups: - Performance - Function autoloading - Consistency Did I miss something big? First of all I don't think the performance argument holds enough weight as I'm very doubtful this impacts performance of a real world application in a significant way. And for people *really* hitting this problem there is a solution already. Secondly I am a bit confused about the whole function autoloading discussion: There is already a good-enough mechanism (putting them as static functions inside a tool class). I just don't consider the hoops we have to jump through to get a more "pure" or fine-grained solution for a special problem not worth it. As for the "don't use classes for static functions" I've yet to see a good argument apart from personal preference. As far as consistency goes I've yet to encounter someone being confused about function resolution. But then again I'm not reaching namespaces for PHP classes. While modern tooling possibly can adapt source code to the new style efficiently I have to maintain too many installations of PHP projects on various hosters to looking forward to that. And the argument that "you can just stay on an old PHP version" is just not a feasible solution either.. Maybe we should take a step back and reevaluate the pros and cons. - Chris