Re: Feature request - allow to append multiple elements to an array
| From: | Jakob Givoni | Date: | Sun, 29 Mar 2020 21:22:20 +0000 |
| Subject: | Re: Feature request - allow to append multiple elements to an array | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109428@lists.php.net to get a copy of this message | ||
On Sun, Mar 29, 2020 at 4:08 AM Iván Arias <txigreman@hotmail.com> wrote:
>
> $arr[] = 1, 2, 3; // push these 3 values
> $arr[] = 1, 2, ... [3, 4, 5], 6; // push these 6 values
Just to play with this... - normally an assignment evaluates to the
value being assigned:
var_dump($arr[] = 1); // int(1)
What would this produce?
var_dump($arr[] = 1, 2, 3);
The first value, an array with 3 values or the full $arr?
Cheers,
Jakob