I recently really wanted to us anonymous functions in PHP. Unfortunately my host is still on 5.2
. I automatically thought this would work:
uasort($array, function($a, $b) {
return $a > $b;
});
Is this how they work? Simply passed in as an argument instead of a callback? The docs don't say specifically that's how they do, but I have a working knowledge of JavaScript's anonymous functions, so I assumed they would.