$user = \XF::finder('XF:User', $userIdOfASuperAdmin);
if ($user->is_super_admin)
{
// will be executed when
}
$user->is_admin = false;
if ($user->is_super_admin)
{
// will still be executed due to cached getter result
}
if ($user->getIsSuperAdmin())
{
// will never be executed
}