Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99851 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46753 invoked from network); 12 Jul 2017 09:23:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jul 2017 09:23:04 -0000 Authentication-Results: pb1.pair.com header.from=krukowski.bartlomiej@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=krukowski.bartlomiej@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.176 as permitted sender) X-PHP-List-Original-Sender: krukowski.bartlomiej@gmail.com X-Host-Fingerprint: 209.85.216.176 mail-qt0-f176.google.com Received: from [209.85.216.176] ([209.85.216.176:33743] helo=mail-qt0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 79/34-01782-87AE5695 for ; Wed, 12 Jul 2017 05:23:04 -0400 Received: by mail-qt0-f176.google.com with SMTP id r30so13684596qtc.0 for ; Wed, 12 Jul 2017 02:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=0d7nCxSXTLzwZuMwjsSFCijCZ+eiARvphN3vyIwSe0Y=; b=kcELDWQAf9MFlSW/1d+44cEu7ESG53+vGisxJnXI6XP7nszSAnu1bxN9z65+7/5YUE zozqP2vsDFkXYQhzVMt3CzJNXYbZk5/X4aM6qOnOdPWgJvs1DT21rJn9YpzjtG0b1AOT t6e/TkOouISl8KmqbNn+KGlJfC1/DcVthmATUllXb1f9e9H+4sGLAUqPEueVlU1JpU90 22jvmswxLT0Hlr7IHVhc18ZciwdQFDPKESur75DZkQ6ND7FzuKtvyBAe2w/2uJPq2n/C E/RoJlz0HSEP6eCIBQvhcDStD3gku4Mc43fDCd0DB4xbI+dYY6eSBIqq211V4CglPi6q tmgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0d7nCxSXTLzwZuMwjsSFCijCZ+eiARvphN3vyIwSe0Y=; b=XfNba5nO7rmtKj6lumZ4Tqh8suyHtVrEgMrlcZVuvdWbGzv9D/vuHzDfLHC1wzhtbd MCmgWC586GGoCMd/cPuefmKc6RVSzVWrMwG8wxfj3wA2x5M+/eKRK8G+UkRXV8uBOsnK WaejAJFtPOSd2y/E2u4KXRY+LTnLDPhhOd6YGEgFnAiJ/orC4iisyvu/5Cn6wRCJqkjT VQkSSOYHEKSb2Ha/80cr/44U9ibmzdQCOQuayBl0yy/uTBCqE9vwBO2qoef9QfFay7gr sgfj03s/MSBunOs5vdfSpcexClY9VX2Vn3J4vJZaVwRRv9evgEYdiSbxK41pEA4oHTRS nltA== X-Gm-Message-State: AIVw111pfS9A3oVfx1aMlEi3mR21ig+wV0exCIg5arR3tFIMnEkAeagy u2wxhUgRicLxl4A/UUmPREciQq23yu0h X-Received: by 10.237.62.58 with SMTP id l55mr5330165qtf.20.1499851380377; Wed, 12 Jul 2017 02:23:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.152.18 with HTTP; Wed, 12 Jul 2017 02:22:39 -0700 (PDT) Date: Wed, 12 Jul 2017 11:22:39 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="001a1144de9abe4c6f05541b5c9e" Subject: RFC proposal - unpack iterator From: krukowski.bartlomiej@gmail.com (=?UTF-8?Q?Bart=C5=82omiej_Krukowski?=) --001a1144de9abe4c6f05541b5c9e Content-Type: text/plain; charset="UTF-8" Hello, From PHP 5.6 we have possibility to add variadic functions and unpacking arrays via *...* Would be nice to extend responsibility of *...*. Sometimes in code I can find lines similar to the following: $result = array_merge(['some value'], ['some other value'], $array); I would like to shorten this line to the following: $result = ['some value', ['some other value'], ...$array]; And even allow to unpack more than one array: $result = ['some value', ['some other value'], ...$array, ...$secondArray]; Using new operator we can produce shorter and more clearable code. I would like to create RFC for my proposal. If you think idea can be useful, please give me an access for creating RFC. Best regards --001a1144de9abe4c6f05541b5c9e--