dev-master
9999999-dev http://github.com/chdemko/php-intervalInterval for PHP >= 5.4
CeCILL-B
The Requires
- php >=5.4.0
The Development Requires
interval
Wallogit.com
2017 © Pedro Peláez
Interval for PHP >= 5.4
Interval for PHP., (*2)
This project uses:, (*3)
Using composer: either, (*4)
$ composer create-project chdemko/interval:1.0.x-dev --dev; cd interval
or create a composer.json file containing, (*5)
{
"require": {
"chdemko/interval": "1.0.x-dev"
}
}
and run, (*6)
$ composer install
Create a test.php file containg, (*7)
<?php
require __DIR__ . '/vendor/autoload.php';
use chdemko\Interval\Interval;
$interval = Interval::fromString('[2,3[');
echo $interval . PHP_EOL;
$interval->sup = 4;
echo $interval . PHP_EOL;
$interval->inf = - INF;
echo $interval . PHP_EOL;
if ($interval->contains(0))
{
echo "0 is contained in $interval" . PHP_EOL;
}
else
{
echo "0 is not contained in $interval" . PHP_EOL;
}
This should print, (*8)
[2,3[ [2,4[ ]-INF,4[ 0 is contained in ]-INF,4[
See the examples folder for more information., (*9)
If you are using this project including publication in research activities, you have to cite it using (BibTeX format). You are also pleased to send me an email to chdemko@gmail.com. * authors: Christophe Demko * title: php-interval: a PHP library for handling intervals * year: 2014 * how published: http://chdemko.github.io/php-interval, (*10)
Interval for PHP >= 5.4
CeCILL-B
interval