PHP搜索功能澄清

I found this function in another question on Stack Overflow, but I would like a clarification on something:

function sort_comments($ar)
{
    $comments = array();
    foreach($ar as $item)
    {
        if(is_null($item['parent_id'])) $comments[] = $item;
        else 
        {
                $parent_array = array_search_key($item['parent_id'],$comments,'id');
                if($parent_array !== false) $comments[$parent_array]['replies'][] = $item;
        }
    }
    return $comments;
}

Could someone explain the arguments passed to array_searched_key() ? I searched for this function in php.net but did not find it. Again, I'm a bit confused about the arguments, specially why the $comment array is passed to it.

First, this is not a PHP core function. It's a Wordpress function built specialy to sort comment when displaying them.

But there's a simple explanations as I understand it:

First argument: the ID to search (the query)
Second argument: array to search in (the datas)
Third argument: the column to search in (in the array)

As I understand it, it's this.

If you linked the relevant StackOverflow thread it would put things in context. My guess is that it's this implementation, or similar. The function is not native to PHP and without knowing it's source it's impossible to answer.

I don't think it is the WordPress function being used in this case - the only place I can find this function in the WordPress codebase only accepts two parameters.

I rather think that they are referring to this other function I found on pastebin. Unfortunately, the author hasn't provided comments describing the parameters but we have:

$needle - a value to match inside the array of arrays being searched 
$haystack - an array of arrays being searched 
$haystackKey - the key within the inner arrays which we want to find in the array of arrays
$strict - if set to true (default false) then type matching is enforced

So, the function returns true if the key and data pair can be located in at least one of the inner arrays, and false if not.