PHP code example of flexvisionbe / belgian-structured-communication

1. Go to this page and download the library: Download flexvisionbe/belgian-structured-communication 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/ */

    

flexvisionbe / belgian-structured-communication example snippets


// convert ID to StructuredCommunication
var_dump(BelgianStructuredCommunication::create("0123456789", 3));

// get ID
var_dump(BelgianStructuredCommunication::check("+++012/3456/78939+++", 1));

// get checksum
var_dump(BelgianStructuredCommunication::check("+++012/3456/78939+++", 2));

// check if valid
var_dump(BelgianStructuredCommunication::check("+++012/3456/78939+++", 3));
// of invalid...
var_dump(BelgianStructuredCommunication::check("+++912/3456/78939+++", 3));