Skip to content

[Backport] array_push(...) calls behaving as '$array[] = ...', $array[] = works faster than invoking functions in PHP #16359

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

Conversation

lfluvisotto
Copy link
Contributor

Original Pull Request

#16144

Description

array_push(...) calls behaving as '$array[] = ...', $array[] = works faster than invoking functions in PHP

See note in PHP documentation:

http://php.net/manual/en/function.array-push.php

Note: If you use array_push() to add one element to the array, it's better to use $array[] = because in that way there is no overhead of calling a function.

…y[] = works faster than invoking functions in PHP
@magento-engcom-team magento-engcom-team added this to the Release: 2.1.15 milestone Jun 23, 2018
@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-2113 has been created to process this Pull Request

@magento-engcom-team magento-engcom-team merged commit 66de2da into magento:2.1-develop Jun 26, 2018
magento-engcom-team pushed a commit that referenced this pull request Jun 26, 2018
… ...', $array[] = works faster than invoking functions in PHP #16359
@magento-engcom-team
Copy link
Contributor

Hi @lfluvisotto. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.1.15 release.

@lfluvisotto lfluvisotto deleted the 2.1-develop-PR-port-16144 branch November 22, 2019 21:37
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.

4 participants