Never use array_merge in a loop
The spread operator to the rescue.            Flattening a one-level array   I have seen people...
Tags: php, array, performance, spread