TCNo
in package
Tags
Table of Contents
- checksum() : string
- Generates Turkish Identity Number Checksum Gets first 9 digit as prefix and calculates checksum
- isValid() : bool
- Checks whether a TCNo has a valid checksum
Methods
checksum()
Generates Turkish Identity Number Checksum Gets first 9 digit as prefix and calculates checksum
public
static checksum(string $identityPrefix) : string
https://en.wikipedia.org/wiki/Turkish_Identification_Number
Parameters
- $identityPrefix : string
Tags
Return values
string —Checksum (two digit)
isValid()
Checks whether a TCNo has a valid checksum
public
static isValid(string $tcNo) : bool
Parameters
- $tcNo : string