function SchemaStringVersion($xmlstring) { if (!is_string($xmlstring) or empty($xmlstring)) { return FALSE; } if (preg_match($this->versionRegex, $xmlstring, $matches)) { return !empty($matches[2]) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION; } return FALSE; }