1. Go to this page and download the library: Download clouding/range 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/ */
clouding / range example snippets
use Clouding\Range\Range;
$range = new Range(1, 10);
$range = Range::parse('1..10');
echo $range->start; // 1
echo $range->end; // 10
$range = new Range(1, 10);
var_dump($range->contains(5)); // bool(true)
$range = new Range(1, 10);
$rangeFoo = new Range(1, 10);
var_dump($range->equals($rangeFoo)); // bool(true)
$range = new Range(1, 10);
$rangeBar = new Range(5, 10);
var_dump($range->intersect($rangeBar)); // bool(true)