Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102368 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61728 invoked from network); 22 Jun 2018 12:43:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jun 2018 12:43:08 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.48 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.215.48 mail-lf0-f48.google.com Received: from [209.85.215.48] ([209.85.215.48:43436] helo=mail-lf0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/2D-32156-BDEEC2B5 for ; Fri, 22 Jun 2018 08:43:08 -0400 Received: by mail-lf0-f48.google.com with SMTP id l15-v6so1986559lfc.10 for ; Fri, 22 Jun 2018 05:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:from:date:message-id:subject:to:cc; bh=z2kgnK+OxAy17mU3bMHmZFeQ367SrxxstRxo6V/fMoE=; b=EjCMVkTtn2ijy+auT/nVpNX6Cua3gUIeUuFhUBLVO2mD40y4Ou42BaeDqisf13ivbR vIUcm10Q+B91jkyvxURP7uUB/UZTyJ6rapKmACte1k9ThQhNCo2esBCCpDqvBA1joKAS onmb22xpyDnMK3KnK+wRKRhi0OqRJsKUJEOXXF49jl+6ulek5S5o/9Z/t0TvFprE8S6L uq7Kue6E7mTQkulBbvn6l+DFwuEnTfDvCfDd/KuZy7KwDAHQqiftqTQ7u3Px5U93wrfR mUXl4zRAkTbeSsSeaY/3GKzmcyVWmKdvAURr6+17Ks/aHtkli1Ofg0pi08zwr26/qb0b OXXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:from:date:message-id :subject:to:cc; bh=z2kgnK+OxAy17mU3bMHmZFeQ367SrxxstRxo6V/fMoE=; b=X4ytdCotbfOSonHhSXOg+qVfZUaHGmO3LgenxW5G3t44wCnEMNA/KZpuQNAitJR0GF V0M0KmbUuQJbdt6Da1zIzKT4+qWoM8MaNgVEXDZlQ0bzCVpHq5j6mH59QGHsefBdZLTR gNT4zckqc90LZ4KIrzgnO9DERJVx/dC6Bk8TJFXXoIKdiQ6Smyk7pmiGnm5P8t4e1TH2 uAy5q8bYVWNVGhuQSlGphffD4sYpCrMgLE0JyGIqPIPlGM5KD0dOdJextN1HGGOjzpQR jhcsgLTv5cSlO+xt1+dPcjauyRFrKp4zF00cAAZFUpQPpLWpqvrb1zWL/Mqf++zp9c9n Ybmg== X-Gm-Message-State: APt69E2qHtZOmMDPchWWEMs3NjEEVFmcZnPsHzQlrFtMhnfltKH3jFOx E9cd16pb8AGUMjswVMU5ZChlYaut3x4Rag1iGas= X-Google-Smtp-Source: ADUXVKLmdr+L3P+r9X9VzLa+lYjYqZwd6q0R/r1cEfbAYDPr9rkeA0tcSOXEfHpFY7sSHKGBPm39ZEp7VC80r+KEEUk= X-Received: by 2002:a19:2216:: with SMTP id i22-v6mr1279719lfi.136.1529671384308; Fri, 22 Jun 2018 05:43:04 -0700 (PDT) MIME-Version: 1.0 References: Date: Fri, 22 Jun 2018 06:42:47 -0600 Message-ID: To: rtheunissen@php.net Cc: Dan Ackroyd , internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Equality and relative ordering of objects From: morrison.levi@gmail.com (Levi Morrison) On Fri, Jun 22, 2018 at 6:39 AM Levi Morrison wrote: > > > > 1. You can't override the behaviour of `<`, `<=`, `>`, `>=`, `==`, `!=` > > with a userland implementation. > > 2. Therefore, you won't be able to affect the internals of array functions > > like `in_array`, `sort` etc. > > In my opinion we should have functions which take comparator and/or equality functions as parameters even if we can override these operators. I'd like to see an outline of such a plan as part of this RFC or as a precursor to it. (I know some already have this option, such as usort, but we don't have an `in_array` that takes an equality callback, correct?)