关闭令人困惑的usort

I am trying to rewrite a co-developers script and ran across this little gem, I for the life of me cannot even understand what it does, much less how to refactor it. Would someone explain to me what it does, and if my interpretation of his code is correct?

the original code:

$f = "return (${$v[0]}['{$k}'] - ${$v[1]}['{$k}']);";
usort($results, create_function('$a,$b',$f));

my attempt and rewriting it as a closure:

$f = function ($k,$v)
{
    return ($v[0][$k] - $v[1][$k]);
};

usort($results, $f($k, $v));

EDIT

For clarity, $k is a random string, and $v is an array of either ['a','b'] or an array of ['b','a']

I'm really lost on what the attempt was, maybe it was this?

usort($results, function () USE ($k,$v) 
{
    return ($v[0][$k] - $v[1][$k]);
});

You just have to do this

$f = function ($k,$v)
{
    return ($v[0][$k] - $v[1][$k]);
};

usort($results, $f);

Read more about Closures and usort in php.net