PHP code example of sururulab / brasil-helper

1. Go to this page and download the library: Download sururulab/brasil-helper 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/ */

    

sururulab / brasil-helper example snippets


php composer 

"sururulab/brasil-helper": "dev-master"

php composer update


use sururulab\BrasilHelper\BrasilHelper;

echo BrasilHelper::checkCNPJ('23.419.212/0001-03');

echo BrasilHelper::checkCPF('635.850.266-21');

echo BrasilHelper::checkIE('0136042371217', 'AC');

var_dump(BrasilHelper::estados());

var_dump(BrasilHelper::bancosBrasileiros());



use sururulab\BrasilHelper\BrasilHelper;

if(BrasilHelper::checkCNPJ('23.419.212/0001-03')){
	echo 'Válido';
}else{
	echo 'Não Válido';
}


use sururulab\BrasilHelper\BrasilHelper;

if(BrasilHelper::checkCPF('635.850.266-21')){
	echo 'Válido';
}else{
	echo 'Não Válido';
}