Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103473 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49012 invoked from network); 21 Nov 2018 23:09:02 -0000 Received: from unknown (HELO mail-it1-f172.google.com) (209.85.166.172) by pb1.pair.com with SMTP; 21 Nov 2018 23:09:02 -0000 Received: by mail-it1-f172.google.com with SMTP id a205-v6so10623821itd.4 for ; Wed, 21 Nov 2018 11:31:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NclDvGiOdKgeJgwIsIZtZPnMPGuR3fRuTwAEveF1Cfs=; b=EEg7WW0/P0Jb2lr99yGYdr5WI5mPhyoKL+a28wlB6sDxlLWRPQ53WNHODwWtxCR+l8 V0nFrqV2/EtSZGzaXjERYNJPFZ1GX7Yiys0wpsL39kEVTAbhPDT7qg83FY4BU/S8sW8r 1gucephVec9fQAkbS9Nib+sZv8lhDpkXRZ+5Gf0mFFg0GTT0m8b28KTA3l66IQC3iiEK s/jmXHrqtODTXxSnaMVfsNqZMXXauZKK6N1LBtAD2hiozHiuU1UsONz5YiXTI0NjCN8+ 9eYD+HxxjKc47WRepKJ6ZGtddQ0jbk7qnz2pi/YTpp9tJBunlGcxv/6lrQbvimZnF7yj /CFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NclDvGiOdKgeJgwIsIZtZPnMPGuR3fRuTwAEveF1Cfs=; b=PFgMiE1Ue0GpiNXRD7i4eHMW2aEb+hbL8PAfdNQR0b2K8pOYmEi5wCmocKYxFS+WSH YtT8hx3XXoi6LSBlRh5MlONqBwTKbCoB64wOvwLB/VWJPpgTzm/0o34FXriAQOkbFVjC NIoB3V/t3kAz0kRbw7r6YoNVNMFmHeT/VrlfkHwoLQ24HrmfADH3F/nmR54xXFicS8wt XT1tWXTf2X9uXlgImcpTsrHxrG0xb3evgiPgsfWJ3VW1LXH2t1vjC1y7sFWWXpbos/RU VI0+sgdTAgph8G8cqZuTcOQjXOv+pC7YfcDbcJK+/6Nhg4C6/U6/J8c46LjYexj1YwCa ZkyA== X-Gm-Message-State: AGRZ1gK+i4Ijp4bNNA3smPJEUPDqg77/BR7kFbgE5NwmuGM8ZNA1gmBT e5v22/DulpFirnKfK8zfjk5b12NEQpHHy0321/YcNw== X-Google-Smtp-Source: AJdET5fCEWWZf6zvVL7sFCe9PDODeYDQQoJJVgz7W/gs2J4nCHw0FRCRbfvTiilJGwKjyA73/mA4EUws1OVxua4HO+s= X-Received: by 2002:a05:660c:81a:: with SMTP id j26mr6998585itk.70.1542828674110; Wed, 21 Nov 2018 11:31:14 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 21 Nov 2018 20:30:57 +0100 Message-ID: To: me@jhdxr.com Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000011da15057b31cbd5" Subject: Re: [PHP-DEV] [RFC] Spread Operator in Array Expression From: nikita.ppv@gmail.com (Nikita Popov) --00000000000011da15057b31cbd5 Content-Type: text/plain; charset="UTF-8" On Mon, Nov 19, 2018 at 9:26 AM CHU Zhaowei wrote: > Hi internals, > > I'd like to start the discussion for [RFC: Spread Operator in Array > Expression](https://wiki.php.net/rfc/spread_operator_for_array). In > short, this is a syntax similar to argument unpacking, but for array. > > You can find the implementation [here]( > https://github.com/php/php-src/pull/3640). It's still WIP, but I'll > finish it in the next following weeks. This looks reasonable to me. The array_merge() behavior is certainly the one I would (in PHP) expect intuitively, and it is likely the most useful one as well, striking a balance between behavior useful for pure vectors and pure dictionaries (and falling short if it's not either ... as is usual in PHP). Nikita --00000000000011da15057b31cbd5--