Sorting array containing objects

This is proposing a solution about sorting array containing objects.
(For example, an array containing ORM instances.)
But, I think this approach creates few overhead.
How do you think?