original_string: public static function clearExcept(array $keepInstanceNames)
      {
          foreach (self::$instances as $name => $instance) {
              if (!in_array($name, $keepInstanceNames)) {
                  self::clear($name);
              }
          }
      }
code: public static function clearExcept(array $keepInstanceNames)
      {
          foreach (self::$instances as $name => $instance) {
              if (!in_array($name, $keepInstanceNames)) {
                  self::clear($name);
              }
          }
      }
code_tokens: public static function clearExcept ( array $ keepInstanceNames ) { foreach ( self :: $ instances as $ name => $ instance ) { if ( ! in_array ( $ name , $ keepInstanceNames ) ) { self :: clear ( $ name ) ; } } }
docstring: Remove all stored instances but KEEP the passed instance names.
  
  @param string[] $keepInstanceNames
docstring_tokens: Remove all stored instances but KEEP the passed instance names .