PHP implementation of a Damm algorithm for error detection