Re: Equality and relative ordering of objects

From: Date: Mon, 25 Jun 2018 11:56:41 +0000
Subject: Re: Equality and relative ordering of objects
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to internals+get-102414@lists.php.net to get a copy of this message
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 (#102414) next »