{"repo":"rakibdevs/mrz-parser","free":true,"listed":false,"github":"https://github.com/rakibdevs/mrz-parser","clone":"git clone https://github.com/rakibdevs/mrz-parser.git","description":"A PHP package for MRZ (Machine Readable Zones) code parser for Passport, Visa & Travel Document (TD1 & TD2).","language":"PHP","stars":38,"topics":["mrz","mrz-parser","passport","visa","php"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"MRZ (Machine Readable Zones) Parser for PHP A PHP package for MRZ (Machine Readable Zones) code parser for Passport, Visa & Travel Document (TD1 & TD2). It reads the machine-readable zone, extracts the document fields, and — new in v2 — verifies the ICAO 9303 check digits so you can tell whether the data is internally consistent. Requirements - PHP 8.2 or higher Installation You can install the package via composer: Usage Output Check-digit validation Every result carries a valid flag (overall) and a validation map with the outcome of each ICAO 9303 check digit ( card no , date of birth , date of expiry , personal number for passports, and the composite ). Visas carry no composite check digit, so their validation map omits it. Use these to reject OCR mistakes or tampered documents. Input handling Input is normalized before parsing: \\r\\n / \\r line endings are converted to \\n , surrounding whitespace is trimmed, and blank lines are dropped — so MRZ strings copied from Windows or OCR output parse the same as clean input. Dates are validated strictly (impossible dates such as Feb 30 return null ), and a date of birth that would resolve to the future is shifted back a century. Advanced usage Typed result object read() returns an MrzResult value object with typed properties and helpers, while toArray() gives you the same array as parse() : Non-throwing parsing parse() / read() throw on unrecognised input. Use the try variants to get null instead: Strict check-digit mode Pass strict","default_branch":null,"files":null,"tree":[],"storefront":"/r/rakibdevs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rakibdevs/mrz-parser/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}