Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91549 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52311 invoked from network); 8 Mar 2016 17:59:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2016 17:59:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=mtkocak@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mtkocak@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.43 as permitted sender) X-PHP-List-Original-Sender: mtkocak@gmail.com X-Host-Fingerprint: 74.125.82.43 mail-wm0-f43.google.com Received: from [74.125.82.43] ([74.125.82.43:35238] helo=mail-wm0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/07-03587-E031FD65 for ; Tue, 08 Mar 2016 12:59:42 -0500 Received: by mail-wm0-f43.google.com with SMTP id l68so143693478wml.0 for ; Tue, 08 Mar 2016 09:59:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:message-id:date:to:mime-version; bh=1YsrX20gbHuh3m345VshbU6CeD0UtcX8SjP/Ff+r4fs=; b=UovdfarRJtcDycN6okuJV07Ed3FmbXlzyODWunLRP9Ms9C7713YFIk8UhkkYgpVn01 CKPEItLKMDNRKWo1KDmbZ2aghCEL5Uaz1fZoFmjccKk9goG2YsmvhIiWBjFD86rH8140 sd2sMPYc+WXMh32Xk967D65Z0oEd2vMe7eQg4z2e231BLpcDY+y5+ctPYH5rBwMhpNGe 0TNvD3/A1Ci+SPGTGqZUVnhX+DI1dic0rER+4saJefDycFMTeKZd7E4SwNvxvDDyN+df lozOFeDZb9V2EBeaep2JN/TqRPG7xqZv2BCc7NFPO6nTcHGT8kCACt07u23HnPpFdKMX amVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:message-id:date:to:mime-version; bh=1YsrX20gbHuh3m345VshbU6CeD0UtcX8SjP/Ff+r4fs=; b=Dc+30ae+YyqnEwZJQTDQFTATlJQzaY5MzEQX/yZGjFKoXHjPI3vJnFe+XSvUwR0KQA 1nHelFlZDfe4dBZLhnIGbykmy3RBxDdd5CjO+qZ+8BSE0h8jsNFx39VIwsIwC/JY27oA 16Pz2E/IuMNiyfUI7BSjTnOhhG2d0E5X6uf3Ph6D5AadkcwZnceMdpi+XPow1kB5cpxy pAS2ESpgG4uLCSGdkGt9WDem64CkmmblI5Jsl3RiOm560SclOpAdi+Ho1jFCj0BGarwx nyW//uxKHAaLTK9auNV8KkQo7tNWB3VhHOWPxwzM4Qun31vVyAJXDGH9aOcLRIuHvrMN LVwg== X-Gm-Message-State: AD7BkJLb/UT0vx9O1vZVSvlPFfjESCn2twWiF0zWi+MwMx+1eZmtanfIDKRbAPFqKXTaCA== X-Received: by 10.194.71.46 with SMTP id r14mr33421305wju.100.1457459979466; Tue, 08 Mar 2016 09:59:39 -0800 (PST) Received: from [192.168.2.91] ([81.0.216.145]) by smtp.gmail.com with ESMTPSA id h7sm11177523wmf.9.2016.03.08.09.59.38 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Mar 2016 09:59:38 -0800 (PST) Content-Type: multipart/alternative; boundary="Apple-Mail=_BFFA8835-CF15-440B-A5EE-FF6E5D9DCEA0" Message-ID: <4DF77339-7112-4F26-A98D-82E6492880C2@gmail.com> Date: Tue, 8 Mar 2016 18:59:37 +0100 To: internals@lists.php.net Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) Subject: Equal Null coalescing operator ??= https://github.com/php/php-src/pull/1795 From: mtkocak@gmail.com (Midori Kocak) --Apple-Mail=_BFFA8835-CF15-440B-A5EE-FF6E5D9DCEA0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Remember my question?=20 $this->request->data['comments']['user_id'] =3D = $this->request->data['comments']['user_id'] ?? =E2=80=98value=E2=80=99; I want to check if some var is null and if the same var is null set the = same var to =E2=80=98value=E2=80=99. Hence I am repeating the same variable after the equal operator, this = does not feels right. So I feel that we need another operator like =E2=80=9C??=3D=E2=80=9C = similar to +=3D; $this->request->data['comments']['user_id=E2=80=99] ??=3D =E2=80=98value=E2= =80=99. So if the var is null it=E2=80=99s set to =E2=80=98value=E2=80=99 = and else stays the same. I implemented it. Please check this here: = https://github.com/php/php-src/pull/1795 = Midori= --Apple-Mail=_BFFA8835-CF15-440B-A5EE-FF6E5D9DCEA0--