Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102367 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60358 invoked from network); 22 Jun 2018 12:40:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jun 2018 12:40:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=levim@php.net; sender-id=unknown Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.46 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.215.46 mail-lf0-f46.google.com Received: from [209.85.215.46] ([209.85.215.46:34750] helo=mail-lf0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/DC-32156-62EEC2B5 for ; Fri, 22 Jun 2018 08:40:06 -0400 Received: by mail-lf0-f46.google.com with SMTP id e13-v6so8733782lfc.1 for ; Fri, 22 Jun 2018 05:40:06 -0700 (PDT) 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:in-reply-to:from:date :message-id:subject:to:cc; bh=UEiV36EIxOoDf1WjugKGRumgMQto4JzbLq1lhWekE+E=; b=P7K2tALVqOU9q97mB5YJhAZw7edPcf7DxU6KuJxkRqY6IGAY9VQSHPo02XFtLE+yao jS3/Rat5k5P4UD+tieU32x70yix/HRVfklaYG+ogHjJ9JELSbrsMTII/8h39xxIuHFVx pwxOkRNHHrQPag+MCCul0pMz83J/fes0gJMPkmHNG/KBLCwrOt72qwYeRRqMZo2RDqTv Ag4ocQOXQ5UpJEplhBq9qE5Md9kpqzCzbM3NJicPHPr8CAQzI/AlWjRZDoMg3DEs5zE8 9VJ5uRdLyjQgecD28pWWyQk2lDQ8Gc2shs43lwJjS1OfAgolOB4uH0YIPm+Xlo5J7Z4D Z3Ag== X-Gm-Message-State: APt69E0o0iJtOCqyrHycejLpvQtLW9xOffJYVmzaftUuyKEHSwTIQF6W LPIrv0By+0TKLqWR56FF0aVZ50MMcdpUxOaQGm9Trg== X-Google-Smtp-Source: ADUXVKKGXyCQy5Qs7eJbgEQEUc3Mo3e+fBIaGdlwNy3X4N+wGxugD5TNiFSkourfl+YES8CCXJhhB230C2HsjwfKwJs= X-Received: by 2002:a19:ca5c:: with SMTP id h28-v6mr471219lfj.142.1529671203208; Fri, 22 Jun 2018 05:40:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 22 Jun 2018 06:39:45 -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: levim@php.net (Levi Morrison) > 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.