DEV Community

Discussion on: Never use array_merge in a loop in PHP

Collapse
einenlum profile image
Yann Rabiller

Hi :)

I think you meant in PHP 7.4? wiki.php.net/rfc/spread_operator_f...

Collapse
klnjmm profile image
Jimmy Klein Author

Hi,

No, this work in PHP 5.6 : php.net/manual/en/migration56.new-..., "Argument unpacking via ..." section

Collapse
einenlum profile image
Yann Rabiller

Oh! Indeed, array_merge is a function so variadic arguments work… Did not think about it . Thx!