public static function isValidCode( $code ) {
		return
			strcspn( $code, ":/\\\000" ) === strlen( $code )
			&& !preg_match( Title::getTitleInvalidRegex(), $code );
	}
public static function isValidCode( $code ) {
		return
			strcspn( $code, ":/\\\000" ) === strlen( $code )
			&& !preg_match( Title::getTitleInvalidRegex(), $code );
	}
public static function isValidCode ( $ code ) { return strcspn ( $ code , ":/\\\000" ) === strlen ( $ code ) && ! preg_match ( Title :: getTitleInvalidRegex ( ) , $ code ) ; }
Returns true if a language code string is of a valid form, whether or
not it exists. This includes codes which are used solely for
customisation via the MediaWiki namespace.

@param $code string

@return bool
Returns true if a language code string is of a valid form whether or not it exists . This includes codes which are used solely for customisation via the MediaWiki namespace .