lmsaud/phpcpf

CPF verify for PHP 5.3

Maintainers

Package info

github.com/lmsaud/phpCPF

Homepage

pkg:composer/lmsaud/phpcpf

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

dev-master 2018-01-09 00:13 UTC

This package is not auto-updated.

Last update: 2026-03-11 15:33:05 UTC


README

PHP class used to check if a given CPF number is valid and also get the brazilian state of the cpf number

Usage

require_once "CPF.php";
$cpf = new CPF(PUT_CPF_DIGITS_HERE);
if($cpf->isValid()) {
  echo "CPF is OK";
}
else {
  echo "CPF is NOT OK";
}

$uf = $cpf->getUF();
echo "STATE OF ORIGIN: " + $uf;