{"id":24402276,"url":"https://github.com/p810/tuple","last_synced_at":"2025-07-17T04:33:59.309Z","repository":{"id":57034839,"uuid":"93186450","full_name":"p810/tuple","owner":"p810","description":"An implementation of tuples in PHP.","archived":false,"fork":false,"pushed_at":"2020-03-19T21:19:30.000Z","size":14,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T20:08:47.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p810.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-02T16:56:03.000Z","updated_at":"2021-10-09T00:27:58.000Z","dependencies_parsed_at":"2022-08-24T06:40:10.856Z","dependency_job_id":null,"html_url":"https://github.com/p810/tuple","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p810%2Ftuple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p810%2Ftuple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p810%2Ftuple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p810%2Ftuple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p810","download_url":"https://codeload.github.com/p810/tuple/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248473128,"owners_count":21109628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-20T00:59:44.605Z","updated_at":"2025-04-11T20:08:52.676Z","avatar_url":"https://github.com/p810.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tuple\n\u003e An implementation of tuples in PHP.\n\n## Installation\n```\ncomposer require p810/tuple --no-dev\n```\n\n## Usage\n```php\n\u003c?php\n\nuse function p810\\Tuple\\tuple;\n\n$tuple = tuple('foo', 'bar');\n```\n\nYou can also use the [Tag Space Unicode character](https://emojipedia.org/tag-space/) (U+E0020) as a function to make it look like tuples do in Python. This is a proof of concept that I thought would be fun to add. Your coworkers probably won't think it's very fun though so please, weigh your options before using this.\n\n```php\n$tuple = 󠀠('hello', 'world');\nvar_dump($tuple); // =\u003e p810\\Tuple\\Tuple#3 (2) {...}\n```\n\n## Why?\nThis is a project I wanted to take on just because. I borrowed the idea from Python, which was my first introduction to the concept.\n\nAll 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp810%2Ftuple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp810%2Ftuple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp810%2Ftuple/lists"}