Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128700 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 6B9B61A00BC for ; Sat, 13 Sep 2025 23:42:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1757806883; bh=qRb5gXG57ryBH6XgIVIj4hPm8HtUj99qy7hAg1Xq4Bw=; h=Date:Subject:To:References:From:In-Reply-To:From; b=KP8L7nOmBjUWp2gzwSAq4UagnTIlo4DgWpBASYw4336yD6RJMU3XqwVuVCIQWWyWl 8dozdgg3Gj2jcQScGaA/H53c7vkfuzX7eNX6rQbnbDcIrIFLpV3YhYyL4shOOP4gxb aeuJpsZ8BY0Tss97G2cpjmBc1yWkETRjVRut0FVZgxY3gxZfv1Itm/fOCJ55XLS1jc HgNCidFXpUtimN2Ng05dGWcaZnXhDOATsLjDSKtbhsY6yXOfpUoCwVkrnNJ3XDw1/L mb//6obtVUpmzhiOkqUgaS5XUrUmT4H36T0bLgau0UeBjRU/6rjiQrmS7fH+zuXC5s jOmh8dLM741XQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4A83E18006A for ; Sat, 13 Sep 2025 23:41:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from alcott.smtp.mailx.hosts.net.nz (alcott.smtp.mailx.hosts.net.nz [43.245.52.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 13 Sep 2025 23:41:20 +0000 (UTC) Received: from 122-57-11-211-adsl.sparkbb.co.nz ([122.57.11.211] helo=[192.168.1.67]) by alcott.smtp.mailx.hosts.net.nz with esmtpsa authed as varteg.nz (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim 4.96) (envelope-from ) id 1uxZtC-004Agq-1W for internals@lists.php.net; Sun, 14 Sep 2025 11:42:42 +1200 Message-ID: <9c76a7c3-9f30-4e5a-8cbe-3733dfb87550@varteg.nz> Date: Sun, 14 Sep 2025 11:42:26 +1200 Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC proposal] Syntactic sugar for array push() To: internals@lists.php.net References: <23fc3c05-f238-44d5-9a27-778c73db4a23@app.fastmail.com> Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Hosts-DKIM-Check: none From: weedpacket@varteg.nz (Morgan) On 2025-09-13 22:21, Rowan Tommins [IMSoP] wrote: > On 12 September 2025 20:02:04 BST, "Dušan Kreheľ" wrote: > > Since we have an extremely well-established array_push shorthand, so don't need a new one, we could perhaps have "<" for "at start", and "-" for "pop": > > $foo[<] = $toUnshift; > $shifted = $foo[-<]; > Which looks like it would $foo[0] $foo[1] $foo[2] <-- put $toUnShift here rather than put $toUnshift here --> $foo[0] $foo[1] $foo[2]