Re: Object comparison

From: Date: Fri, 09 Nov 2012 21:00:54 +0000
Subject: Re: Object comparison
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-63796@lists.php.net to get a copy of this message
On Fri, Nov 9, 2012 at 2:18 PM, Christian Stoller <stoller@leonex.de> wrote: > I would like to place a suggestion for comparing objects (I hope it is no problem, because this > does not have anything to do with Sara's question - but it came to my mind when I read her > mail). It would be a great feature if objects could be compared to other objects with > ">", "<" and the other operators, like it is suggested in RFC > https://wiki.php.net/rfc/comparable > The DateTime class offers this feature - it would be nice if this could be made usable for > userland classes/objects, too. I really like that idea, and the patch looks pretty good and looks backward compatible. I'm +1 with it I'm also +1 with patching the doc to describe the full default compare behavior. Julien.Pauli

« previous php.internals (#63796) next »