Created
January 9, 2019 11:02
-
-
Save d70rr3s/208e5e143b6788f18d19e80e338aeea7 to your computer and use it in GitHub Desktop.
Merge two no-assoc arrays without array_merge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using array_merge inside loops is a greedy construction, also cannot | |
// sum arrays since their indexes are the same. | |
// @see https://stackoverflow.com/a/37065301 | |
@array_push($arr1, ...$arr2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment