Skip to content
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

Prefix all function calls with a \ #114

Merged
merged 1 commit into from
Aug 7, 2019
Merged

Conversation

BackEndTea
Copy link
Collaborator

This means PHP won't search the current namespace for a function first It also means that for some functions, php can use its opcode (on PHP 7.0+), which is an actual speed increase.

If possible i'd use the use function syntax, but that became available in php 5.6, and thus isn't an option atm.

For a relevant discussion about prefixes/opcodes see: PHP-CS-Fixer/PHP-CS-Fixer#3048 (comment)

This means PHP won't search the current namespace for a function first
It also means PHP can use the Opcache (opcode?) for some functions,
which is the actual speed increase.

If possible i'd use the `use function` syntax, but that became
available in php 5.6, and thus isn't an option atm.
@BackEndTea BackEndTea force-pushed the enhancement/function-prefix branch from fd143bb to e8ab511 Compare August 7, 2019 18:33
@BackEndTea BackEndTea merged commit 35207c6 into master Aug 7, 2019
@BackEndTea BackEndTea deleted the enhancement/function-prefix branch August 7, 2019 18:36
BackEndTea added a commit that referenced this pull request Aug 9, 2019
This means PHP won't search the current namespace for a function first
It also means PHP can use the Opcache (opcode?) for some functions,
which is the actual speed increase.

If possible i'd use the `use function` syntax, but that became
available in php 5.6, and thus isn't an option atm.
BackEndTea added a commit that referenced this pull request Aug 9, 2019
This means PHP won't search the current namespace for a function first
It also means PHP can use the Opcache (opcode?) for some functions,
which is the actual speed increase.

If possible i'd use the `use function` syntax, but that became
available in php 5.6, and thus isn't an option atm.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants