PHP code example of vctls / php-interval-graph
1. Go to this page and download the library: Download vctls/php-interval-graph 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/ */
vctls / php-interval-graph example snippets
use Vctls\IntervalGraph\IntervalGraph;
$intervals = [
[new DateTime(2018-01-01), new DateTime(2018-01-04), 0.3],
[new DateTime(2018-01-02), new DateTime(2018-01-05), 0.5],
[new DateTime(2018-01-03), new DateTime(2018-01-06), 0.2],
];
$intervalGraph = new IntervalGraph($intervals);
echo $intervalGraph;