PHP code example of nijens / range

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

    

nijens / range example snippets

 php


use Nijens\Range\Range;

$range = Range::parse('0..1');

echo $range->getFrom(); // Output: 0
echo $range->getTo(); // Output: 1
 php


use Nijens\Range\Range;

$range = new Range(0, 1, false);

echo $range; // Output: 0..1