Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121429 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 68209 invoked from network); 19 Oct 2023 10:08:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Oct 2023 10:08:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2ED6B180503 for ; Thu, 19 Oct 2023 03:08:07 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 19 Oct 2023 03:08:06 -0700 (PDT) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-31427ddd3fbso6319394f8f.0 for ; Thu, 19 Oct 2023 03:08:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; t=1697710085; x=1698314885; darn=lists.php.net; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CR0c7cT5NAvLjzFR39xH8XyhOsEDx2sNnjM24y8RjBY=; b=RW7W92c5w7sqr3KJJIFKAneD/tl5I/H3rpyoSFXXgaL44dJd+iGvTnvjNrvpYJ9S5O /BtEXBHxER8Iq1qQyFosRzDGZ3zhxVr1Mn11wXtXoOtYlpr4wXn4LDqm5IeRB24aIiTE 6iENGoa/3qfL4F3+0n5x0tRammnuMWuCr86+I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697710085; x=1698314885; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CR0c7cT5NAvLjzFR39xH8XyhOsEDx2sNnjM24y8RjBY=; b=sU3UpuqiTAwDq79PMxUCoSggmaBCBQdKMK1dPESllN//FgFb4gYR7SHfijfQHkbOG3 KYv77NP6S2vEId5QbzfNAwWFrUCaoksFwBXL71oYXGcsaYb1WB0Rb6BTdtjqX8CuOaWo DTK1Y3eRFUXnVUOVZJYFvHgff26vLVMj5cUPmxVgGdIY8xcSGTstyZ08eeg0u8ocaZBk 9PgqtG2bXnABXko41VPjHuXQlwQqLDDspar7fmPKPz5+L2hA6PcIg5FFqhC22lKrQIT4 QqxrzSRGvS8wsPvKSsTLiH41oowq7zA145aLugRy5Qos+I+IU9MchDlNB41O8frzfHfx Hm6w== X-Gm-Message-State: AOJu0YymYnEuFOtCXx1jez+gcjB3Xko8beR8dIkvJmjP1DA+u1xc1wo4 s7WLeoHj9N+1aP+Vd6GvKe3PzA== X-Google-Smtp-Source: AGHT+IFtjSgwhE+Ypx32e/WeXwFmvGUxD4hHKPhO+9HINnptvLqHPC3TgRw/BNjkAIXjE8BvshaXQA== X-Received: by 2002:a5d:4847:0:b0:32d:8246:5c67 with SMTP id n7-20020a5d4847000000b0032d82465c67mr1363342wrs.29.1697710085022; Thu, 19 Oct 2023 03:08:05 -0700 (PDT) Received: from smtpclient.apple ([92.238.103.248]) by smtp.gmail.com with ESMTPSA id f12-20020adfb60c000000b00318147fd2d3sm4079019wre.41.2023.10.19.03.08.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2023 03:08:04 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) In-Reply-To: Date: Thu, 19 Oct 2023 11:07:54 +0100 Cc: php internals Content-Transfer-Encoding: quoted-printable Message-ID: References: To: someniatko X-Mailer: Apple Mail (2.3731.700.6) Subject: Re: [PHP-DEV] Custom object equality From: craig@craigfrancis.co.uk (Craig Francis) On 18 Oct 2023, at 13:50, someniatko wrote: > There were already suggestions on the mailing list to allow = "overloading" existing `=3D=3D` operator, and some suggestions went even = as far as overloading `<`, `>=3D` etc operators. Slightly off-topic, but concatenation? Just as a possible feature... for my sins I'm the database component = maintainer for WordPress, and I'm currently getting `wpdb::prepare()` to = work with the `literal-string` type, where I added support for escaping = identifiers (field/table names). This function works like `sprintf()`, = with the SQL being the `$format` argument, and then user values; from = that it returns an SQL string with escaped values (yes, I know, = parameterised queries are better, but we work with what we have)... = developers often concatenate these together, but I was wondering if I = could return a stringable value-object, so when they are concatenated, a = new value-object could be created instead, so we can verify (ideally at = runtime) that all values have been escaped correctly (and maybe use = parameterised queries). Craig=