Its kinda useless feature for PHP.
Daniel Ribeiro Gomes Pereira Twitter <https://twitter.com/#!/drgomesp> | Facebook<https://www.facebook.com/profile.php?id=100000407054469> | LinkedIn <http://www.linkedin.com/pub/daniel-ribeiro-gomes/21/414/39> iPhone: +55 (48) 9111-0931 2013/5/7 Nikita Popov <nikita....@gmail.com> > On Tue, May 7, 2013 at 6:17 PM, Thomas Anderson <zeln...@gmail.com> wrote: > > > It'd be nice if, when doing $objA > $objB, that that'd invoke > > $objA->__compareTo($objB) or something, much like Java's Comparable > > interface. > > > > Do you have examples of what this would be useful for? The two things that > come to mind are DateTime (which can do this anyway as it's an internal > class) and classes for bignums or something like that (which are probably > also better implemented internally). So I'm not sure how much use there is > for this. > > Nikita >