Re: Equality and relative ordering of objects

From: Date: Sun, 24 Jun 2018 15:29:37 +0000
Subject: Re: Equality and relative ordering of objects
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-102392@lists.php.net to get a copy of this message
On Sun, Jun 24, 2018 at 8:11 AM Rudi Theunissen <rtheunissen@php.net> wrote: > > Here is a WIP implementation of __compareTo, with some decent > tests. > > > https://github.com/php/php-src/compare/master...rtheunissen:rt-compare-to-magic-method?diff=unified Help me understand the nullable return. If you are defining this operator then by definition you don't want the standard behavior, so why is returning null helpful? Seems like implementors ought to throw.

« previous php.internals (#102392) next »