I am currently using panels3 to override my profile page.
I would like to add a variant to a panel that means the panel only displays to friends or my support staff.
Displaying for support staff is easy because of the visisbilty by role option in the the panel.
For the friend option I was wondering what PHP code would return a truth value if the current logged in user was looking at a friends profile page.
I don't know PHP at all at this stage but I imagine in laymens terms it would be something like.

Is the current logged in user a friend of the user being viewed.

I found PHP reference on another issue that explained how to hide a block based on frined status and partly list that below in hopes to make sense of this request.

$status = friendlist_api_relation_status_get($user->uid, $u->uid, tw_both)
return ($status == 'TW_BOTH');