PHP code example of juanjoc333 / rfc-facil-php
1. Go to this page and download the library: Download juanjoc333/rfc-facil-php 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/ */
juanjoc333 / rfc-facil-php example snippets
php
//Persona físicas
$builder = new RfcBuilder();
$rfc = $builder->name('Juan José')
->firstLastName('Cortés')
->secondLastName('Guzmán')
->birthday(3, 9, 1984)
->build()
->toString();
echo $rfc;
//Personas morales
$builder = new RfcBuilder();
$rfc = $builder->legalName('AUTOS PULLMAN, S.A. DE C.V.')
->creationDate(30, 9, 1964)
->build()
->toString();
echo $rfc;
bash
composer