PHP code example of verdantcart / carbon-txt
1. Go to this page and download the library: Download verdantcart/carbon-txt 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/ */
verdantcart / carbon-txt example snippets
use VerdantCart\CarbonTxt\Generator;
use VerdantCart\CarbonTxt\DTO\Disclosure;
$disclosure = new Disclosure(
organisation: 'Acme Coffee Roasters',
domain: 'acmecoffee.com',
reportingPeriod: '2026',
scope1: 42.3,
scope2: 128.7,
scope3: 3412.9,
);
$generator = new Generator();
echo $generator->render($disclosure, specVersion: '0.5');