DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 967,611 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

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!