Skip to content

Instantly share code, notes, and snippets.

@d70rr3s
Created January 9, 2019 11:02
Show Gist options
  • Save d70rr3s/208e5e143b6788f18d19e80e338aeea7 to your computer and use it in GitHub Desktop.
Save d70rr3s/208e5e143b6788f18d19e80e338aeea7 to your computer and use it in GitHub Desktop.
Merge two no-assoc arrays without array_merge
// 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