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

https://github.com/p810/tuple

An implementation of tuples in PHP.
https://github.com/p810/tuple

Last synced: 11 months ago
JSON representation

An implementation of tuples in PHP.

Awesome Lists containing this project

README

          

# tuple
> An implementation of tuples in PHP.

## Installation
```
composer require p810/tuple --no-dev
```

## Usage
```php
p810\Tuple\Tuple#3 (2) {...}
```

## Why?
This is a project I wanted to take on just because. I borrowed the idea from Python, which was my first introduction to the concept.

All in all, this utility is just a wrapper around a PHP object that implements `ArrayAccess` and restricts the ability to update, set, or remove items, which makes it immutable.