Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127054 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 793321A00BC for ; Sat, 5 Apr 2025 19:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1743880598; bh=KXC/sQJ7Pih5fwWiytKkN3zCQ4H8FRA23Aiv6s3/p5A=; h=Date:From:To:In-Reply-To:References:Subject:From; b=O3pXFejX2MVw2uUj0M78TchUBPyKXKyIrWnFywMOQKHuhuokalJ7Gt+rzpBZEB3LB BiVQJHxS30+Sj/H4E2zCmM3AkP53zdo79DrQADfJayoP36EOK834rmX2VqrW+8qffY Lwt7qKWZbzg7ChqKEgY13UAthJxEppTEiZ4Hm7Ppylg47OQzJnLz7PknfbX8yKMN3e bZ+1qmcZNNl3dQLkN8BeCMJs+Wb9gm1u3DslWKX42WJdR88kgNLP7yu9xqsCphCL0D 7Tg4gWojU5/6YLUmWDi1TdYGQfBLC0ctSQfyobkP9sO/liC1ENKNOvVnAaTn6EyBtM QsgkBTkT0hVkQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 97194180050 for ; Sat, 5 Apr 2025 19:16:37 +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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (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 ; Sat, 5 Apr 2025 19:16:37 +0000 (UTC) Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 7661325400DA for ; Sat, 5 Apr 2025 15:19:02 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-12.internal (MEProxy); Sat, 05 Apr 2025 15:19:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc: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=fm3; t=1743880742; x=1743967142; bh=Zwa5N3I00T bDapDWcBWz4kKXqvRw9ZTviEK5ECNZC28=; b=DHDD7XH99g4NdF/zPb8BBHn/Bo 7/eFbcSk9CH3lAj0flHa8485tZbmHPqX4semLLpjhLtlyxQaug31+1QUm4DKdGCA 4ndCt/W6SbxKqsRmoOw/V1ss5uE9+b3ClvTrGa4paBjT/frRtrj+Fu/sXkyNrVuj YhxbywvVgDSWJ6QbTUSjOSfdJ6yMrqyNoiLNHHZ9FxT4f7M404phasoib/Cn1fJC tI9T/EvaEQjiG43FYvyK29aoZWp30CLujQuJStG3giD2qH29nFl8FUV3vzfC+Jo0 7Af+DwsqPI8ca5xpcbvwHRnUR1GLNJ15fpcB7HcNrmHsoQJnEGk2rMD+Ilvw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm2; t= 1743880742; x=1743967142; bh=Zwa5N3I00TbDapDWcBWz4kKXqvRw9ZTviEK 5ECNZC28=; b=hZYTR/pr3QV7SXvPJ659eEUc26H0q0buwpNBzzseXOKsEKLL7oK Qh7X+3MLRONjmEEHFpIWJBnC5BHt21cuUoEcH/qqOGyQvFaIiFBPhL99YX1VArGk URMJGioaGmMAAi2abQMVLxvk63QlRzWy1cLqhM+L6plehK6FWTXuzPQGWAQzw0nI EoQ9/C4F8uXoHUgHDMjHabRLPtzjGBtZkg2Jv0xBxrELDmRpBNZ1iUiK0tMkTlhb RJeu45D4Tin3NBT5JGzVzv4bIRV93TekSBQyPczYFD5S5AuObL7c3v3e4f3OvHXx 517GSRVwdhRgKTdJFNXXGxArCBT9KOZ5New== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduleehudekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucgoufhushhpvggtth ffohhmrghinhculdegledmnecujfgurhepofggfffhvffkjghfufgtsegrtderreertdej necuhfhrohhmpedftfhosgcunfgrnhguvghrshdfuceorhhosgessghothhtlhgvugdrtg houggvsheqnecuggftrfgrthhtvghrnheptdeitddvvdevhfdufffhgeelffetgeffveek heekfeeluedutdeiveekvdetjedvnecuffhomhgrihhnpeefvheglhdrohhrghenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrohgssegsohht thhlvggurdgtohguvghspdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuth dprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 0CD15780069; Sat, 5 Apr 2025 15:19:01 -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: Td40fe37c6836e36c Date: Sat, 05 Apr 2025 21:18:41 +0200 To: internals@lists.php.net Message-ID: In-Reply-To: References: <68e5b45e-1ae1-452b-9b4d-788e11c8cfe1@scriptfusion.com> Subject: Re: [PHP-DEV] RFC: blank() Function as a Complement to empty() Content-Type: multipart/alternative; boundary=8a148b6329524ea0af31fdb4523ce72e From: rob@bottled.codes ("Rob Landers") --8a148b6329524ea0af31fdb4523ce72e Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, Apr 5, 2025, at 21:10, Bilge wrote: > On 05/04/2025 19:41, Rob Landers wrote: >> empty() has very many uses. > That is exactly the same as saying `=3D=3D` has many uses. It does. So= many uses that it's useless. Its semantics are nonsense. >>=20 >> if (isset($var) && $varl !=3D false) { >> foo($bool); >> } >>=20 > >$varl !=3D false >=20 > You should never be doing this. >=20 >=20 > Cheers, > Bilge >=20 Heh, to quote a great movie: That's just like, your opinion, man. In all= seriousness, there are quite a number of uses for =3D=3D, especially be= cause we don't have operators on objects, nor do we have value objects. = Sometimes, equality isn't based on identity, but on value: https://3v4l.org/rRMNR =E2=80=94 Rob --8a148b6329524ea0af31fdb4523ce72e Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Sat, Apr = 5, 2025, at 21:10, Bilge wrote:
On 05/04/2025 19:41, R= ob Landers wrote:
empty() has very ma= ny uses.
That is exactly the same as saying `= =3D=3D` has many uses. It does. So=0A many uses that it's useless. It= s semantics are nonsense.

<= div>if (isset($var) && $varl !=3D false) {
  = foo($bool);
}

>= $varl !=3D false

You should never be doing this.

Cheers,
Bilge

Heh, to quote a great movie: That's just like, your opi= nion, man. In all seriousness, there are quite a number of uses for =3D=3D= , especially because we don't have operators on objects, nor do we have = value objects. Sometimes, equality isn't based on identity, but on value= :


=E2= =80=94 Rob
--8a148b6329524ea0af31fdb4523ce72e--