PHP code example of laciochauque / php-references

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

    

laciochauque / php-references example snippets


    use Laciochauque\PHPReferences\Reference;
    $reference = new Reference("12345",3.141593,"1234567","01");
    // O valor da referência é gerado no método constructor e armazenado no atributo reference
    echo $reference->reference; //SAIDA:12345670154 
    // O objecto da desta classe é stringable e retorna a referência gerada, contudo recomendo a instrução acima.
    echo $reference;//SAIDA: 12345670154             

    $reference = \Laciochauque\PHPReferences\Reference::generate("54321",100,"7654321","12");
    echo $reference->reference; //SAIDA:76543211279 

        $reference = \Laciochauque\PHPReferences\Reference::generate("54321",100);
        echo $reference->reference; //SAIDA:22764527060 
shell 
    composer