Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102414 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77122 invoked from network); 25 Jun 2018 11:56:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jun 2018 11:56:57 -0000 Authentication-Results: pb1.pair.com header.from=rtheunissen@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rudolf.theunissen@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.173 as permitted sender) X-PHP-List-Original-Sender: rudolf.theunissen@gmail.com X-Host-Fingerprint: 209.85.217.173 mail-ua0-f173.google.com Received: from [209.85.217.173] ([209.85.217.173:44244] helo=mail-ua0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AD/73-50433-788D03B5 for ; Mon, 25 Jun 2018 07:56:56 -0400 Received: by mail-ua0-f173.google.com with SMTP id v15-v6so1556577ual.11 for ; Mon, 25 Jun 2018 04:56:55 -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=q0AMNbgdB3tYR8Q0Mz0T9xBnscizavIz5YjYKGXvQNA=; b=KUhyU06Wd3UH1IaAJoOT8k+wUjNSsk9/fv3kzhtqot/ZKXTTOkaycbgZHDtcC+VO4M rp/q5vBC7d5QxcjH+GEPGz1T6PmM2EAkIArweeIM0drYDSaITW5aN5E1hIOVaG9MjuPY Yguit/NKP4/SUvHXmMGszDjUS5OULTEiIx8o1lWFH0dbjLsgiLs77rUKXMIIuzLQny9W uq/FAqL6ga5hDefDkD7dKLHpDLrRvj1hNEbDIqL/8tizS06NEB4/WXrvP6/rtkqsyc9h YA2zu4bM4raz3U8Y2OBecBHw4xuphqqKnGrtzqXsNZ21zR1nXMBYCe1nE7HxofqHZaGU +Mng== X-Gm-Message-State: APt69E0e17gZB7JK0Ew7nLBUlMuxHncra8nZ/TGIoJ4bGWde6X54+bq3 KeAhHc7+n08Uvjr3w+x4mRcs82+j X-Google-Smtp-Source: ADUXVKLLiBwB9JwScXVVIoC1C2Zy2w0upJnwkLxjdgWHWblnBg/FOdoq10eEIt0UrmJVkzIvT5WNxA== X-Received: by 2002:a9f:2266:: with SMTP id 93-v6mr7685527uad.142.1529927812885; Mon, 25 Jun 2018 04:56:52 -0700 (PDT) Received: from mail-vk0-f48.google.com (mail-vk0-f48.google.com. [209.85.213.48]) by smtp.gmail.com with ESMTPSA id i2-v6sm3308643uak.18.2018.06.25.04.56.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 04:56:52 -0700 (PDT) Received: by mail-vk0-f48.google.com with SMTP id x4-v6so7636470vkx.11 for ; Mon, 25 Jun 2018 04:56:52 -0700 (PDT) X-Received: by 2002:a1f:b593:: with SMTP id e141-v6mr7773663vkf.171.1529927812114; Mon, 25 Jun 2018 04:56:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 25 Jun 2018 07:56:41 -0400 X-Gmail-Original-Message-ID: Message-ID: To: nikic@php.net Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000c5edf9056f7613e2" Subject: Re: [PHP-DEV] Equality and relative ordering of objects From: rtheunissen@php.net (Rudi Theunissen) --000000000000c5edf9056f7613e2 Content-Type: text/plain; charset="UTF-8" The part I found difficult was in the handlers - we only have `compare`, no equals. The only way we can have the handler differentiate between equality and ordering is if we pass a parameter to the handler, which means we'd have to change the header. From: `typedef int (*zend_object_compare_zvals_t)(zval *result, zval *op1, zval *op2);` To: `typedef int (*zend_object_compare_zvals_t)(zval *result, zval *op1, zval *op2, int mode);` Or we could introduce a new handler? Not sure if that's something we can do easily. --000000000000c5edf9056f7613e2--