An open API service indexing awesome lists of open source software.

https://github.com/nijens/range

Ruby range syntax parser for PHP.
https://github.com/nijens/range

php ruby-range-syntax yaml

Last synced: 3 months ago
JSON representation

Ruby range syntax parser for PHP.

Awesome Lists containing this project

README

          

# Range

[![Latest version on Packagist][ico-version]][link-version]
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-build]][link-build]
[![Coverage Status][ico-coverage]][link-coverage]
[![SensioLabsInsight][ico-insight]][link-insight]
[![StyleCI][ico-code-style]][link-code-style]

Ruby range syntax parser for PHP.

## Installation using Composer
Run the following command to add the package to the composer.json of your project:

``` bash
$ composer require nijens/range
```

## Usage
Parsing a range in Ruby syntax:
``` php
getFrom(); // Output: 0
echo $range->getTo(); // Output: 1
```

Converting a Range instance to Ruby range syntax:
``` php