I've the following code of lines in my application.
Can anybody please tell me what is the purpose of use keyword in the following array_map() function?
array_map( function($record) use ($edit_form, $otherfields, $otherfields_keys)
{
    User::parseData($record, $edit_form['metadata']);
    if (isset($otherfields[$record['user_id']])) {
        return $record + $otherfields[$record['user_id']];
    }
    return $record + $otherfields_keys;
}, $records);
Thanks in advance.
 
    