PHP code example of vvv / identity_card
1. Go to this page and download the library: Download vvv/identity_card library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vvv / identity_card example snippets
$num = '33071919610920021X';
if (IdentityCard::isValid($num)) {
echo '身份证格式正确';
} else {
echo '身份证格式不正确';
}