PHP code example of noka-design / php-ubl

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

    

noka-design / php-ubl example snippets


$serializer = \NOKA\PHPUBL\PHPUBL::getSerializer();
$xml = file_get_contents('path/to/invoice.sml');
$invoice = $serializer->deserialize($xml, \NOKA\PHPUBL\UBL\Invoice::class, 'xml');
shell script
composer