PHP code example of motamonteiro / helpers

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

    

motamonteiro / helpers example snippets


use MotaMonteiro\Helpers\Traits\UtilHelper;
 
class MyClass
{
    use UtilHelper;
    
    public function myFunction()
    {
        $cpf = '43354377224';
        if ($this->validarCpf($cpf)) {
            ...
        }
    }
    
    public function myOtherFunction()
    {
        $data = '21/10/1982';
        if ($this->validarDataFormatoBr($data)) {
            ...
        }
    }
}

use MotaMonteiro\Helpers\UtilHelper;
 
class MyClass
{
    public function myFunction()
    {
        $util = new UtilHelper();
        
        $cpf = '43354377224';
        if ($util->validarCpf($cpf))
        {
            ...
        }
    }
}