I'm wondering if there would be a way to do such a thing as
overloading the () operator of a class in order to use that class as a
callback function. I presently would love to do this with the usort
function in order to easily pass runtime information to the custom
sort callback function. It has been my habit in the past(and with
other languages) to do this by using a class for my callback, setting
the information in the constructor(or any time before the cal really),
and then overloading () to give the class the facade of a function.
If this is posible in PHP please tell me. or, if there is a way to do
a similar thing that's more in keeping with the PHP idiom I'll listen
to that to. It would be useful to know this without all that mucking
about in documentation. If the no is resounding enough I'll write the
sort myself, but with a perfectly good sorting function just sitting
there it seems like a shame to have to do so.