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

Replace php_sapi_name function with PHP_SAPI constant #4934

Closed

Conversation

Ayesh
Copy link

@Ayesh Ayesh commented Jul 31, 2023

Super-micro optimization that replaces php_sapi_name function call with PHP_SAPI constant. One fewer function call, although it would take millions of calls to have a meaningful difference.

Trac ticket: https://core.trac.wordpress.org/ticket/58942


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Super-micro optimization that replaces `php_sapi_name` function call
with PHP_SAPI constant. One fewer function call, although it would take
millions of calls to have a meaningful difference.
@Ayesh Ayesh changed the title Repalce php_sapi_name function with PHP_SAPI constant Jul 31, 2023
@Ayesh Ayesh force-pushed the php-optimizations/php-sapi-name-const branch from e8bb423 to 8b819a1 Compare July 31, 2023 07:15
Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

LGTM ✅ Thanks @Ayesh !

Copy link
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

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

Thanks @Ayesh for the PR. The changes look good to me.

Screenshot 2023-08-01 at 6 04 22 PM
@SergeyBiryukov
Copy link
Member

Thanks for the PR! Merged in r56346.

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