getMatches(); $match = $matches[0]; $total = 0; for ($i=0; $i<15; $i++) { $total = ($total + $match[$i]) *2; } $remainder = $total % 11; $result = (12 - $remainder) % 11; return ($match[15] == ($result==10 ? 'X' : $result)); } // // Public static methods // /** * Return the regex for an ISNI check. This can be called * statically. * @return string */ static function getRegexp() { return '/^(\d{15}[0-9X])$/'; } } ?>