2017 © Pedro Peláez
 

library interval

Interval for PHP >= 5.4

image

chdemko/interval

Interval for PHP >= 5.4

  • Wednesday, June 18, 2014
  • by chdemko
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHP Interval

Downloads Latest Stable Version Latest Unstable Version Code coverage Build Status License, (*1)

Interval for PHP., (*2)

This project uses:, (*3)

Installation

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)

Documentation

Citation

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)

The Versions

18/06 2014

dev-master

9999999-dev http://github.com/chdemko/php-interval

Interval for PHP >= 5.4

  Sources   Download

CeCILL-B

The Requires

  • php >=5.4.0

 

The Development Requires

interval