Re: Equality and relative ordering of objects

From: Date: Thu, 28 Jun 2018 22:37:56 +0000
Subject: Re: Equality and relative ordering of objects
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.internals 
Request: Send a blank email to internals+get-102522@lists.php.net to get a copy of this message
This discussion has moved to the RFC thread here: https://externals.io/message/102473 On Mon, 25 Jun 2018 at 07:56, Rudi Theunissen <rtheunissen@php.net> wrote: > 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. >

« previous php.internals (#102522) next »