Skip to content

[TASK] Prefix native function calls with a backslash #632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

oliverklee
Copy link
Collaborator

This slightly improves performance.

This slightly improves performance.
Copy link
Collaborator

@sabberworm sabberworm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO the ugliness on display here is not worth any performance gains. But if we do this, then, at least, it should be and remain consistent. Can we add some rule that to one of our checkers to enforce (or, better, auto-fix) this?

@oliverklee
Copy link
Collaborator Author

Can we add some rule that to one of our checkers to enforce (or, better, auto-fix) this?

Yes, that‘s the plan. :-) I‘m creating PRs for the code changes first, and once they all are merged, I’ll add the corresponding fixer rules.

@oliverklee oliverklee merged commit 516b322 into main Jul 1, 2024
18 checks passed
@oliverklee oliverklee deleted the cleanup/fixer-1 branch July 1, 2024 18:20
@JakeQZ
Copy link
Collaborator

JakeQZ commented Jul 1, 2024

IMHO the ugliness on display here is not worth any performance gains.

It also helps clarify to the reader that the function being called is in the global namespace (and thus likely to be a built-in PHP function), rather than in the current namespace or some other namespace being used (without having to look that up or have encyclopaedic knowledge). (It's true we don't have any classless functions, or AFAIK use any from another library, but the reader may not know that.)

(Ugliness is in the eye of the beholder. I find these a thing of beauty. They satisfy my inner OCD ;))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants