Skip to content

shahonseven/php-mykad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyKad

Package for extracting information from MyKad

Installation

composer require shahonseven/php-mykad

Usage

use Shahonseven\MyKad\MyKad;

$myKad = new MyKad(720413335315);
$myKad2 = new MyKad('720413-33-5315');

echo $myKad->isValid();
// Results: true

echo $myKad->stateName();
// Results: PAHANG

echo $myKad->gender();
// Results: MALE

echo $myKad->dateOfBirth()->format('Y-m-d');
// Results: 1972-04-13

echo $myKad->dateOfBirth()->diffInYears();
// Results: 51

About

extract information from mykad string

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages