Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126913 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 qa.php.net (Postfix) with ESMTPS id 7788A1A00BC for ; Sun, 23 Mar 2025 15:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742742521; bh=pBbFQbvokjhtbe5Kn4WKrqvV44codNhPbA/Zjo+nM/M=; h=Date:From:To:In-Reply-To:References:Subject:From; b=WULhjcbdDn16oEzDTDoPEvSjGBfvSOXfjfFefIPPygmSLH1JRyaYYUxLEHFgT00p+ 2nCuSr7tIoei9GO8epQilS2G4m+NjdArQNZJyfuu6NPD3pqxLI/5RfFvtXWStCC7D4 0j2VZF3+H4/bqmkkoYTJWUPUTySeyV72K5Lj4oSrRWXO5xZ5LpuSEItsc1zPnsyI/O wO9Xum9GsQ+ye/DV9gIJRJcMsuWYfhuKUdNroAt+yeXycN0w/8G0XG/OEj0J3dIi30 QOKGTzRn7F+jiiYBYRZC2DbcQ6KnURspLKwuBL0GbRCquG2WVfTItRt6rCb31yBu7k dj1dasiw4kWfw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ADA9718004A for ; Sun, 23 Mar 2025 15:08:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 23 Mar 2025 15:08:27 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id EF04F114016F for ; Sun, 23 Mar 2025 11:10:56 -0400 (EDT) Received: from phl-imap-06 ([10.202.2.83]) by phl-compute-04.internal (MEProxy); Sun, 23 Mar 2025 11:10:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm1; t=1742742656; x=1742829056; bh=NiDOG3GBum1xE4+wMNRDn trRfwka0PIFJd+4CVidbWw=; b=n/WPamntGd24ZW/wqHxBbop0xTxJYUFKPLbWw tkL6mwwiENDYGZ1ORgNz95M+NDGHOt4Y6gbbZ65hrgJtCD+3YyjiUSd1zJ0M6hMn 2auN07GytjXg4JLqrjgAk3tKSHDRiULpn4v0HRQDHBXNHCMVaLWxd4hXtZtnPRcl HRmfSomQ8qx0fAl9qShVYaJ0N/sU2kPIMOWVW2CqtHh5VndTLJNBxVZbNOqv16aM ZUh64XHZrBYftAT2k+IP298rjYrACbraIN5vpGlZR/y97dTXwHyqQPPcCABsxY9X JyEiiCwMl2EXXRsaoM8vwBcqpQdLqiDm/r4X1Jli+LNUJKB5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1742742656; x=1742829056; bh=N iDOG3GBum1xE4+wMNRDntrRfwka0PIFJd+4CVidbWw=; b=lcDVTQdFdQ95Yk6X2 8UpCLdy8uYrLzj6s+Ef/31QeeXwwyk7XPOutb+R8Xn50VRxVK3+Irga4L5XYt9zZ Jj3HMp0ELTHh6NtFM7cgMnlh6diH7skpQiTfQcO7gTQf4mENCRBsyMEWQEWYojQj GruG2N4PlgFndyDvA8YZlILkgWsqMN6DuaF5aP9KxcdKeJWlKuhyWEA37zeIGdoK CPxaKLu7yJ6LRqI3Fd5F1OYSyYBBzpFIoS07EQ73MIq2opTHR7IwOAGZBlH9hcqr uGEbDl5ROxoMih4Kgtj8ZIbfAFGWqAsIaRhn47Hs6+3lwN0pp2+ecgsk3eP1Lnyo SN4Bg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduheejudelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtgfesthejredtredt tdenucfhrhhomhepfdfnrghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrh hfihgvlhguthgvtghhrdgtohhmqeenucggtffrrghtthgvrhhnpefgfeefvdetiedvgeeu ledtteehgfegteetieevfeeuhfetteegueehgfeivddtgeenucffohhmrghinhepvgigth gvrhhnrghlshdrihhonecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmpdhnsggprhgtph htthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhs sehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id A02ED29C006F; Sun, 23 Mar 2025 11:10:56 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: T659264a028997cb3 Date: Sun, 23 Mar 2025 10:10:36 -0500 To: "php internals" Message-ID: In-Reply-To: References: <010f0195c30f8ccb-c7fa839e-ec18-4613-9851-9d96b943dca2-000000@us-east-2.amazonses.com> Subject: Re: [PHP-DEV] Feedback for nullc Idea Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Sun, Mar 23, 2025, at 8:37 AM, Kamil Tekiela wrote: > On Sun, 23 Mar 2025 at 12:52, Robert Chapin wrote: >> >> Hi PHP folks, >> >> I submitted a proposal on Monday that received no replies. The idea was >> about adding a functional construct nullc() that could act as an inline >> null coalesce for a variable. That task is currently not possible in a >> nullc() user function, but instead requires an expression like ($var ?? >> null) with mandatory extra parentheses. A functional expression could >> make this less prone to mistakes. It would also avoid concerns with >> alternatives such as unary operators. >> >> Any feedback on this idea would be appreciated. >> >> ------------- >> Robert Chapin > > Hi Robert, > > For some reason, your emails are classified as spam. I am attaching > the link to your previous email for the record. > https://externals.io/message/126826 > > Regards, > Kamil While I can somewhat see the use case, I'd argue that if you have a lot of that use case going on then you should likely rethink your data structures. (Eg, fewer arrays.) That's not always possible at the HTTP boundary (queries are arrays, of course), but if it becomes onerous, there are better ways. I'm not sure it justifies a new pseudo-function language construct. --Larry Garfield