This is a back-port to PHP5.4.
Based on:
Your range objects should implement IntervalTree\RangeInterface. There are numeric and DateTime-based implementations included.
To install via Composer:
composer.phar require judev/php-intervaltree:dev-master
- add to composer.json:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/dillchuk/php-intervaltree"
}
],