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

[11.x] Replaced array_push with direct array syntax #52431

Closed
wants to merge 2 commits into from

Conversation

xurshudyan
Copy link
Contributor

According to PHP documentation, using $array[] = to add a single element is preferred over array_push() due to reduced overhead from function calls.

@FeBe95
Copy link

FeBe95 commented Aug 8, 2024

@xurshudyan Maybe all other occurrences of array_push() should be replaced as well? A quick search revealed only 6 other files that still contain array_push().

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.

3 participants