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.
- Host: GitHub
- URL: https://github.com/p810/tuple
- Owner: p810
- Created: 2017-06-02T16:56:03.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-03-19T21:19:30.000Z (about 6 years ago)
- Last Synced: 2025-04-11T20:08:47.453Z (about 1 year ago)
- Language: PHP
- Size: 13.7 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
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.