Possible Duplicate:
Comparison operator overloading in php
Can I redefine logical operators like "<", "<=" ... in objects in PHP? I know that you can make this in Java, C# or C++ but I don't know if this can be done in PHP
My idea is that I have a bounch of objects and I want to tell PHP that one object is less than other if his date attribute is smaller.
My principal alternative is to use the usort function, but I'd like to know if there is a more elegant way
Thanks