original_string: public static function distinct_settings(&$systemsettings, &$contextsettings, $linksettings) {
  
          if (!empty($systemsettings)) {
              foreach ($systemsettings as $key => $value) {
                  if ((!empty($contextsettings) && array_key_exists($key, $contextsettings)) ||
                      (!empty($linksettings) && array_key_exists($key, $linksettings))) {
                      unset($systemsettings[$key]);
                  }
              }
          }
          if (!empty($contextsettings)) {
              foreach ($contextsettings as $key => $value) {
                  if (!empty($linksettings) && array_key_exists($key, $linksettings)) {
                      unset($contextsettings[$key]);
                  }
              }
          }
      }
code: public static function distinct_settings(&$systemsettings, &$contextsettings, $linksettings) {
  
          if (!empty($systemsettings)) {
              foreach ($systemsettings as $key => $value) {
                  if ((!empty($contextsettings) && array_key_exists($key, $contextsettings)) ||
                      (!empty($linksettings) && array_key_exists($key, $linksettings))) {
                      unset($systemsettings[$key]);
                  }
              }
          }
          if (!empty($contextsettings)) {
              foreach ($contextsettings as $key => $value) {
                  if (!empty($linksettings) && array_key_exists($key, $linksettings)) {
                      unset($contextsettings[$key]);
                  }
              }
          }
      }
code_tokens: public static function distinct_settings ( & $ systemsettings , & $ contextsettings , $ linksettings ) { if ( ! empty ( $ systemsettings ) ) { foreach ( $ systemsettings as $ key => $ value ) { if ( ( ! empty ( $ contextsettings ) && array_key_exists ( $ key , $ contextsettings ) ) || ( ! empty ( $ linksettings ) && array_key_exists ( $ key , $ linksettings ) ) ) { unset ( $ systemsettings [ $ key ] ) ; } } } if ( ! empty ( $ contextsettings ) ) { foreach ( $ contextsettings as $ key => $ value ) { if ( ! empty ( $ linksettings ) && array_key_exists ( $ key , $ linksettings ) ) { unset ( $ contextsettings [ $ key ] ) ; } } } }
docstring: Get the distinct settings from each level by removing any duplicates from higher levels.
  
  @param array $systemsettings   System level settings
  @param array $contextsettings  Context level settings
  @param array $linksettings      Link level settings
docstring_tokens: Get the distinct settings from each level by removing any duplicates from higher levels .