getMatches(); $issn = $matches[1] . $matches[2]; $check = 0; for ($i=0; $i<7; $i++) { $check += $issn[$i] * (8-$i); } return ((int) $issn[7] == 11 - ($check % 11)); } // // Public static methods // /** * Return the regex for an ISSN check. This can be called * statically. * @return string */ static function getRegexp() { return '/(\d{4})-(\d{4})/'; } } ?>