Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105094 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44367 invoked from network); 5 Apr 2019 10:49:39 -0000 Received: from unknown (HELO fuzic.nl) (37.97.145.176) by pb1.pair.com with SMTP; 5 Apr 2019 10:49:39 -0000 Received: from Stijn-MacBook.fritz.box.mail (82-161-213-76.ip.xs4all.nl [82.161.213.76]) by fuzic.nl (Postfix) with ESMTPSA id BDC451E00AA; Fri, 5 Apr 2019 09:45:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=stijnpeeters.nl; s=stamp; t=1554450328; bh=x91Dx3lVGHOAPSBM9R8E7hJxinw+we0BMSIOwQA2Gkw=; h=Date:From:To:In-Reply-To:References:Subject:From; b=yOQ8j0SItlgmZJz2tTbQHtzn/F6Uw8XdTa+ASoQtE2kRwB7M06C/QtKtfsHqA+WD0 w09gYbxYHb1DWv5tWkJ3navanS8X4Xmepry5w24vtRuV9sGHg2GmR9WQ7UfBcs6gye kENuxdoeAYFVo+v9fhwQfIP9xc/HCBB533qqZVEI= Date: Fri, 5 Apr 2019 09:45:23 +0200 To: CHU Zhaowei , 'PHP internals' Message-ID: In-Reply-To: <003a01d4eaf0$c17d6c20$44784460$@jhdxr.com> References: <003a01d4eaf0$c17d6c20$44784460$@jhdxr.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="5ca70798_6170817b_d25" Subject: Re: [PHP-DEV] [RFC] Spread Operator in Array Expression v0.2 From: ik@stijnpeeters.nl (Stijn Peeters) --5ca70798_6170817b_d25 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, If I understand correctly it is possible in this proposal to use normal a= rguments after using an unpackable argument: =24arr4 =3D array(...=24arr1, ...=24arr2, 111); //valid This is something that is not possible when using argument unpacking in f= unction calls: =24result =3D=C2=A0some=46unction(...=24arr1, ...=24arr2, 111); //invali= d While I personally like the more permissive variety in this R=46C, I thin= k this could be a confusing inconsistency, and for clarity's sake it woul= d be better to keep both instances of the unpacking syntax as consistent = with each other as possible. Best, Stijn=C2=A0 Op 4 april 2019 bij 16:15:16, CHU Zhaowei (me=40jhdxr.com(mailto:me=40jhd= xr.com)) schreef: > Hi internals, > =20 > Thanks for the people who joined the discussion of my =5BR=46C: Spread = Operator in Array Expression=5D(https://wiki.php.net/rfc/spread=5Foperato= r=5Ffor=5Farray). The biggest change is I have dropped the support for st= ring keys in v0.2 as suggested by C=C3=B4me, to make the behavior of spre= ad operator consistent. I have also added Q&A to explain the questions I = received. > =20 > Thanks & best regards, > CHU Zhaowei > =20 > =20 > =20 > =20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > =20 --5ca70798_6170817b_d25--